cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging issues with STM32CubeMX for STM32F100RCT MCU generated project in Atollic

_Anani Popov
Associate II
Posted on June 06, 2017 at 12:52

I am having issues when debugging STM32CubeMX for STM32F100RCT MCU generated project in Atollic. The ST-Link debugger jumps to unknown code location and generated HW fault exception. It happens with Cube generated peripheral INI HAL like TIM16, TIM17 and SPI1 as well. Usually in TIMx cases it happens when tmpcr1=TIMx->CR1; line in HAL {void TIM_Base_SetConfig(TIM_TypeDef *TIMx, TIM_Base_InitTypeDef *Structure)} function is executed. In the SPI1 failure case it happens when __HAL_AFIO_REMAP_SPI1_ENABLE() macro is called. I am using Cube App V4.21, FW V.1.4 and Atollic 7.1.2 Lite. Any idea? Please help.

17 REPLIES 17
Posted on June 08, 2017 at 18:21

If ST staff doesn't pick up your bug report, I suggest to open a new thread with a descriptive capture containing 'CubeMX bug'.

You see, I have my reason for not using Cube ...

Imen.D
ST Employee
Posted on June 08, 2017 at 20:54

Hello

Popov.Anani

,

I will check your reportedissue, thenI will raise it internally if confirmed.

I will keep you informed about the taken action.

Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on June 09, 2017 at 08:13

There is still a problem with TIMx

tmpcr1 = TIMx->CR1; line though (see attached screen shots, in this case is TIM15). The peripheral is re-mapped as well, and I saw the same remapping macro calling BIT_SET macro (is this a problem though?).

R0 looks right (TIM15 base address) so I don’t understand what's going on.

Please refer this issue to STM team as well.

Thanks!

Posted on June 09, 2017 at 08:16

0690X00000607IaQAI.png 0690X00000607IfQAI.png
_Anani Popov
Associate II
Posted on June 15, 2017 at 13:01

Hi Imen D,

Any feedback from ST team about the issues I have raised?

Best regards,

Anani

_Anani Popov
Associate II
Posted on June 19, 2017 at 16:33

Hi Imen D,

Any feedback from ST team about the issues I have raised?

Best regards,

Anani

Imen.D
ST Employee
Posted on June 20, 2017 at 14:32

Hi

Popov.Anani

,

Sorry for this delay to answer you.

I confirm the remap bug for STM32F1 which is planned to be fixed in next release of STM32CubeF1 package.

Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
_Anani Popov
Associate II
Posted on June 22, 2017 at 10:47

Hi All,

The issue of getting Hard Fault when executing 

TIMx

tmpcr1 = TIMx->CR1; instruction with timers 12...17 was finally resolved. I was using a very old silicon revision of STM32F100RCT6 - rev.X, which does not have all these timers! Unbelievable, because these samples were shipped to me on 19 of May 2017! Apparently ST warehouse in Malaysia dumped me its old stock! Quite disappointing though, a set-back of two weeks in my development!