How to config DMA for LPC ADC?

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

How to config DMA for LPC ADC?

1,088 Views
emb02
Contributor IV

I'm trying to configure DMA for ADC using Peripheral tools but there is no option for config. I've used ADC Example code Peripherals settings but I'm not getting expected result.

1) How can I config below function using Peripheral tools or it can be config manually only?

INPUTMUX_Init(INPUTMUX);
INPUTMUX_AttachSignal(INPUTMUX, _DMA_ADC_CHANNEL, _Adc0SeqaIrqToDma);

2) There is no option in Peripheral tools to config DMA Descriptor, what should I do to config this functions manually?

DMA_SetupDescriptor(&(s_dma_table[0]), g_XferConfig, (void *)_ADC_DATA_REG_ADD, (void *)&g_AdcConvResult, (dma_descriptor_t *)&(s_dma_table[1]));


DMA_SetupDescriptor(&(s_dma_table[1]), g_XferConfig, (void *)_ADC_DATA_REG_ADD, (void *)&g_AdcConvResult, (dma_descriptor_t *)&(s_dma_table[0]));

Labels (1)
Tags (3)
0 Kudos
2 Replies

949 Views
emb02
Contributor IV

Waiting for Reply

0 Kudos

949 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello emb02 j

 

I apologize for my late reply.

 

  1. Unfortunately, these functions can only be configured manually.
  2. To configure the descriptor you can use the TCD (Transfer Control Descriptor), it can be modified at the ConfigTool. The parameters that DMA_SetupDescriptor() receives are

 * desc: DMA descriptor address.

 * xfercfg: Transfer configuration for DMA descriptor.

 * srcStartAddr: Start address of source address.

 * dstStartAddr: Start address of destination address.

 * nextDesc: Address of next descriptor in chain.

 pastedImage_2.png

Let me know if this is helpful, if you have more questions do not hesitate to ask me.

Best regards,

Omar

0 Kudos