AnsweredAssumed Answered

Behaviour of PC13 not as expected.

Question asked by John Fitter on Mar 17, 2018
Latest reply on Mar 18, 2018 by John Fitter

I am setting up a board that uses an STM32F103C8. It has an LED on PC13. I am running FreeRTOS and configuring with STMCubeMX. I am also enabling the LSE clock and RTC.


Using Cube MX I configure this and ensure that TAMPER is disabled/PC13 is GPIO and Output. I would therefore expect that PC13 (tamper pin) would behave as a GPIO and the LED would work. This is not the case.


The LED remains ON which means that PC13 is LOW. Nothing I do will change this. I have spent a great amount of time reading the documentation and studying the HAL, which I suppose is a good thing, but it has not solved my problem. I have also tried test code calling HAL and HALex functions but with no success. 


The chip documentation is vague about the behaviour of PC13 when the RTC is configured to use LSE. CubeMX is clear - it is a valid setting, but it does not work. I can find no place in the HAL where this pin may or may not be reconfigured.


Does anyone have any idea what is going on here? I have run out of time to fix this. I have papers to mark and a cranky supervisor to satisfy with a long report. I have hung an LED off another pin which solves the problem for now, but this is not a solution, just a kludge.


I really should bin my el-cheapo STM boards and stick with my Nucleos. At least they work as I expect.