The hal_timer.c module never worked for the CC2530 (the registers had not been ported from the CC2430) and so you will see that the module is empty in later Z-Stack installers. With a little work, you could get the module working for CC2530, but I would recommend you to just make you own module with your specific proprietary use of the one H/W timer that you need. If you try to revive hal_timer.c module, one thing I noticed missing from your configuration above is the HAL_TIMER=TRUE setting in hal_board_cfg.h
Hi Harry,thanks a lot for your answer. BTW, it was posted by a colleague of mine because my internet connection was not working properly this morning.
It's a bit weird. I think I've seen a sample application which makes use of timers to send the same message every 5 seconds. Am I missing something?
Anyway, I don't get your suggestion. How is it possible to use the H/W timer if I cannot call the HalTimerInit() function which is supposed to be called before using any of the timers available on the CC2530? Might you please make me an example, if you have a bit of spare time?
Thanks a lot in advance,Gianluca
The application you are thinking of was probably using the OSAL S/W timer, +/- 1 msec at best with 4-12 msec jitter during heavy radio load. Thus the H/W timer would be used for a hard real-time deadline, and such needs are usually way too specific to be properly/easily abstracted with a HAL module. Thus, HalTimerInit() was just trying to abstract the H/W Timer registers a little. So you just need to review the data sheet for the CC2530, write to a few of the configuration registers for the H/W timer that you want, copy and paste an ISR handler, say from hal_led.c or hal_keys.c or even the old defunct hal_timer.c and setup your ISR handler, enable the ISR, and away you go!
You are right, Harry.Thanks a lot for your answer. You were right, indeed; in that program the OSAL timer is used. Anyway, its specifications are good enough for the timing requirements of my projects, so I think I myself will use this timer.
Thanks a lot,Gianluca
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.