Hello,
I am working with the NUCLEO-F103RB board and I am using the USER pushbutton on PC13 to create an interrupt.
I would like to modify the AFIO_EXTICR4 register to force PC13 as in the screenshot below:
I write this code line :
AFIO->EXTICR = AFIO->EXTICR | AFIO_EXTICR4_EXTI13_PC;
The IDE indicates an error !
Can you tell me the correct syntax to modify this register.
Thank you very mutch for your help.
Best regrads
Marc
Hi Marc,
EXTICR is defined as an array of 4 in the header file:
typedef struct{ __IO uint32_t EVCR; __IO uint32_t MAPR; __IO uint32_t EXTICR[4]; uint32_t RESERVED0; __IO uint32_t MAPR2; } AFIO_TypeDef;
typedef struct
{
__IO uint32_t EVCR;
__IO uint32_t MAPR;
__IO uint32_t EXTICR[4];
uint32_t RESERVED0;
__IO uint32_t MAPR2;
} AFIO_TypeDef;
so, to set a bit in the EXTICR4 you would need to write:
AFIO->EXTICR[3] = AFIO->EXTICR[3] | AFIO_EXTICR4_EXTI13_PC;
Hello Milorad,
Thank you very much for your answer and I also found an answer by searching on the Internet in a tutorial on Youtube.
I work with two NUCLEO cardsNUCLEO-F103RB with this parameters :
Which allow me this mode of display of the peripherals :
NUCLEO-L476RG with this parameters :
Which does not allow me the same mode of display.Do you have a solution to be able to visualize the peripherals as with the NUCLEO-F103RB ?
Best regards
for L4 there is no fancy peripheral view as you saw on F1, but there is peripheral view that can help you.
when you are in debug view you can select Peripheral -> System Viewer and then the peripheral you want to see.
Like shown in the screenshot below:
Hi Milorad,
Thank you very much for your quick and interesting answer.What a pity that we cannot visualize the peripherals as with the NUCLEO-F103RB.
Have a nice day