We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, if I load the Blinky example program to MCBSTM32F400 demo board, then open the watch window, then I cannot watch any of the the APB1 peripherals (e. g. TIM2, TIM3, ...). I get the message <cannot evaluate> in the "Value" column.
Strangly the peripherals of the other busses work (e. g. APB2: TIM1, TIM8, ..., or AHB1: GPIOA, GPIOB, ..., or AHB2: DCMI, ...). But not really: If I want to change e. g. the value of GPIOG->MODER register, I cannot do this in the watch window (but I can do this in the system view window of GPIOG). (after clock enable in RCC->AHB1ENR in the function LED_Init).
Anyone can give me a hint, why the peripherals of APB1 might not be accessible in the watch window? I use the current uVision V4.54, and the original code of Blinky, directly from the folder Keil\ARM\Boards\Keil\MCBSTM32F400\Blinky.
I now found out the following:
In STM32F4xx.H the bus base registers are defined as follows:
#define PERIPH_BASE ((uint32_t)0x40000000) /*!< Peripheral base address in the alias */ #define APB1PERIPH_BASE PERIPH_BASE #define APB2PERIPH_BASE (PERIPH_BASE + 0x00010000) #define AHB1PERIPH_BASE (PERIPH_BASE + 0x00020000) #define AHB2PERIPH_BASE (PERIPH_BASE + 0x10000000)
If I change the line for APB1PERIPH_BASE to the following:
#define APB1PERIPH_BASE (PERIPH_BASE + 0x00000000)
Then it works - then I can watch the APB1 registers also (just not modify them, but I can do this in the system viewer - this is quite ok for me).
Just perhaps somebody from Keil should look into this - I think this is really very strange.
... just tried in MDK4.60 - still the same strange thing (so to fix, it is necessary to adjust the STM32F4xx.h as described in my last post).