Currently writing a new BSP and wondering what things should go where. There are two routines that jump out at me as being useful places to put hardware/board initialisation bits and pieces, _bsp_initialize_hardware and _bsp_enable_card. But I'm unclear what should go in each one. I've a number of things to do, eg external clock config, global event flag creation, ADC scheduling, UART driver installation.
So my guess is that hardware things that do not need MQX, and indeed MQX may rely on should be done in _bsp_initialize_hardware. So external clock config should be done here?
But by the time _bsp_enable_card executes, MQX is pretty much fully up and running. So MQX routines like _lwevent_create could be put here to create the MQX environment before autostart tasks are generated?
ADC, UART things could go in either _bsp_enable_card or a standard task once MQX is fully up and running.
So is that about right, or am I way off the mark? I have to admit I'm finding MQX just a little overwhelming, and there seems to be a lack of clear documentation for PSP/BSP tailoring. I couldn't even find a book about it on Amazon!!
Cheers in advance for your advice.