LPC4370 HSADC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC4370 HSADC

489 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mshrestha789 on Mon Aug 18 10:16:55 MST 2014
Hello friends,

Recently I tested HSADC of the LPC4370 microcontroller. By creating FreeRTOS task, I was able to run ADC at the speed of 20 MSPS. But when I used timer interrupt for the same I couldn't get more than 1 MSPS. I set timer interrupt to work at the speed of 2 MHz. I checked and it was working at that speed but when I used same to trigger ADC the maximum ADC speed I got was 1 MSPS. Can anyone please tell me the reason for this?

Any help regarding this will be highly appreciated.
Labels (1)
0 Kudos
2 Replies

396 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Trung Thanh on Sat Aug 23 13:01:30 MST 2014

Quote: mshrestha789
Hello friends,

Recently I tested HSADC of the LPC4370 microcontroller. By creating FreeRTOS task, I was able to run ADC at the speed of 20 MSPS. But when I used timer interrupt for the same I couldn't get more than 1 MSPS. I set timer interrupt to work at the speed of 2 MHz. I checked and it was working at that speed but when I used same to trigger ADC the maximum ADC speed I got was 1 MSPS. Can anyone please tell me the reason for this?

Any help regarding this will be highly appreciated.


Hello!
What complier do you use?
Now i try to setup ADCHS with Keil C but it really hard? I don't Know how to check base clock's frequencry?
0 Kudos

396 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mshrestha789 on Wed Aug 20 08:04:29 MST 2014
Hello friends,

Here's more detail of what I did. I used clock setup from lpcopen. And in the first descriptor entry I halt it and generated interrupt. Here's the descriptor entry table:

Chip_HSADC_SetupDescEntry(LPC_ADCHS_CMSIS, 0, 0, (HSADC_DESC_CH(HSADC_CHANNEL) | HSADC_DESC_HALT | HSADC_DESC_INT | HSADC_DESC_MATCH(HSADC_DESCRIPTOR_TIME) | HSADC_DESC_THRESH_A | HSADC_DESC_RESET_TIMER));

Then when I trigger ADC using RTOS task with port tick 1,  I could get up to the speed of 20 MSPS. But when I used timer interrupt, even if I generated timer interrupt at 2 MHz rate, I couldn't get more than 1 MSPS speed of ADC.
0 Kudos