2015-01-07 09:15 PM
Hi...
I am using STM8S family controller.I am also using SPI Bus to communicate with Peripheral.(As per my requirement SPI need to run properly.) During Run time, initially STM8S work properly but after some time it will hang...I check this pin of STM8S...SPI CLOCK = STOP (no clock)Any one face this type of problem of Hang in past, then please help me.....What is reason behind this type of issue of ''Hanging of STM8'' ?How to solve this problem ?Thanks & Regards,Hardip Limbasiya2015-01-08 01:12 AM
Hi Hardip,
I presume the SPI communication is to run indefinitely and is only one way? Is the peripheral working as expected? When you say the SPI hangs does that mean the STM8 has reset or still doing something? Ian2015-01-08 02:29 AM
Hi Ian,
In SPI Bus, I am sending & receiving 10 bytes Packet. SPI Use => Two Way (At a time only one way(send/receive) using interrupt).SPI clock => No signalBut when I configured clock to CLK_CCO pin in MCU. it will show clock is running.then why SPI clock is not working ?Initially proper working then it will hang.Externally(wires) When I connect Reset to GND ==> ( Reset = LOW) ,When I
disconnect Reset to GND ==> ( Reset =
HIGH) ,
It will not reset circuit. SPI Clock still not working.After Power reset...initially work then again hang. ThanksHardip2015-01-08 02:47 AM
Hi Hardip,
Thanks for the information. The effect of the reset pin will depend on if you have it configured as an I/O or reset pin and then what happens by a reset of this nature compared to a power on reset. The CLK_CCO pin will output the chosen clock but it won't indicate what the mcu is doing, just that the clock is running ok. I suspect you need some extra debugging in your SPI code either via the debugger or perhaps via RS232 output. Maybe you need to output/view the current byte/packet sent/received or use an incrementing variable in your SPI code to count the packets etc. etc. Hope this helps. Ian2015-01-08 10:44 PM
Hi Ian,
Thanks for the quick help.I am trying with few more debugging steps and let you know.Thanks,Hardip