CW 10.2
MQX 3.8
Kinetis K40 512
I'm having a lot of issues with the A/D driver that hopefully someone can help me out with. I have basically followed the example code for the A/D using lwevents, but they are not working.
I have three channels set up on ADC0 and ADC1 and I use the ioctl command ADC_IOCTL_FIRE_TRIGGER to trigger both channels, then I wait for any of the events to post. Only the first one will post and it only happens once. After that, there is no activity.
All three channels are set to the same event with a different mask, so I find it strange that only one will ever fire. I attached the task I am currently using.
Anyone? The A/D driver has some serious issues. You can't change the update period without breaking the whole thing.
I can't even run the A/D example if I want to modify the udpate rate.
Hi dan.quist,
One PDB channel is associated with one ADC. They can't occur on 2 different channels within one module. Check Programmable Delay Block section in Reference Manual for your MCU for more detailed information.
Regards,
MartinK
That's fine, but it doesn't even work if I try to just get a single A/D channel to run. If I run the K53 example program it doesn't even work, it spits out 5-10 conversions and then isn't able to get any more data. I was hoping that the example would at least work correctly.
Hello dan.quist,
does channel 1 (ADC1_SOURCE_ADPM1) stop after 5-10 conversions? I've run example on my K53 and it was running for at least dozen of ADC conversations.
Regards,
MartinK