Ok, so recently we discovered the kernel log had some errors which David fixed (thanks). I found this as I was trying to figure out why my ADC code was failing to open more than three devices. I figured it was related to a stack usage issue, but now I can see my stack is easily large enough.
I am using MCF52259demo, CW10.2, debug MQX4.0, and I need to have 6 ADC devices, but it will only allow two.
I have modified the demo code to run three ADC devices (which are connected on my board, but possibly not on the demo board supplied). Either way, it wont fopen the third device, it will return NULL.
Attached is my modified adc_demeo.c
Here is the ttya output:
-------------- Begin ADC example --------------
Opening ADC device ...done
Opening channel #1 ...done, prepared to start by trigger
Opening channel #2 ...done, one sequence started automatically
Opening channel #3 ...failed
The function call "result = (*dev_ptr->IO_OPEN)(file_ptr, (char _PTR_)open_type_ptr, (char _PTR_)open_mode_ptr);" is not returning MQX_OK for some reason when trying to open the third device.
Original Attachment has been moved to: adc_demo.c.zip