GPT Event, and callbacks
Posted: Fri Feb 03, 2012 12:58 am
Giovanni,
I worked through the GPT Driver and have continuous timers running.
In testing the RTC Driver, I enable it, and set a 10 sec continuous timer, with the callback to simply call rtcGetTime and report it. If I use
chprintf((BaseChannel *)&SD2,"m:s %d:%d\r\n", minute, second);
the time is reported from COM2 as expected. If I use
chprintf((BaseChannel *)&SD2,"d:h:m:s %d:%d:%d:%d\r\n", day, hour, minute, second);
the code hangs without displaying the first time string. ie the length of the string triggers the crash in some way.
Some USB activity is occuring with Windows trying to query an unknown device, and might be related. Is it that calling chprintf from a callback is the problem? It almost seems that chprintf is not completing before something else trips it.
Suggestions?
DOC Correction: In Real Time Clock Abstraction Layer, it reads
"than disable RTC_SUPPORTS_CALLBACKS option in halconf.h"
This should be "then disable RTC_SUPPORTS_CALLBACKS option in os\hal\platforms\STM32\RTCv1\rtc_lld.h"
I worked through the GPT Driver and have continuous timers running.
In testing the RTC Driver, I enable it, and set a 10 sec continuous timer, with the callback to simply call rtcGetTime and report it. If I use
chprintf((BaseChannel *)&SD2,"m:s %d:%d\r\n", minute, second);
the time is reported from COM2 as expected. If I use
chprintf((BaseChannel *)&SD2,"d:h:m:s %d:%d:%d:%d\r\n", day, hour, minute, second);
the code hangs without displaying the first time string. ie the length of the string triggers the crash in some way.
Some USB activity is occuring with Windows trying to query an unknown device, and might be related. Is it that calling chprintf from a callback is the problem? It almost seems that chprintf is not completing before something else trips it.
Suggestions?
DOC Correction: In Real Time Clock Abstraction Layer, it reads
"than disable RTC_SUPPORTS_CALLBACKS option in halconf.h"
This should be "then disable RTC_SUPPORTS_CALLBACKS option in os\hal\platforms\STM32\RTCv1\rtc_lld.h"