This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MDK4.54-STM32F4: Watch window TIM2...

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.

Parents
  • 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.

Reply
  • 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.

Children