Config Tools 4.0 configuring DMA issue

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

Config Tools 4.0 configuring DMA issue

1,193 Views
palvepalamalych
Contributor I

Hello. After configuring DMA channels, i am run "Build All" and my project crashed whis error: 

../board/pin_mux.c:94:31: error: 'DMA_CHANNEL0_IDX' undeclared (first use in this function)

Screenshot:

pastedImage_1.png

I have a question - What i am need to do?

Or, please, say me, how create DMA channal ?

Tags (1)
0 Kudos
3 Replies

570 Views
marek_neuzil
NXP Employee
NXP Employee

Hello,

Thank you for reporting of this issue. It is a problem in the Pins tool. In your case you can remove the initialization of the DMAMUX channel from the Pins tool (pins_mux.c file contains initialization code from the Pins tool only) and you can directly use the initialization code of the DMA component (initialization code is generated in the peripherals.c file). This generated code of the DMA_1 component also contains the initialization of the DMAMUX channel, see the following code of the DMA_1_init(void) function:

/* Channel ADC initialization */
/* Set the source kDmaRequestMux0ADC0 request in the DMAMUX */
DMAMUX_SetSource(DMA_1_DMAMUX_BASEADDR, DMA_1_ADC_DMA_CHANNEL, DMA_1_ADC_DMA_REQUEST);
/* Enable the 0 channel in the DMAMUX */
DMAMUX_EnableChannel(DMA_1_DMAMUX_BASEADDR, DMA_1_ADC_DMA_CHANNEL);
/* Create the DMA DMA_1_ADC_Handle handle */
DMA_CreateHandle(&DMA_1_ADC_Handle, DMA_1_DMA_BASEADDR, DMA_1_ADC_DMA_CHANNEL);
DMA_SetCallback(&DMA_1_ADC_Handle, transferDMA_CH0, NULL);
DMA_EnableCycleSteal(DMA_1_DMA_BASEADDR, DMA_1_ADC_DMA_CHANNEL, false);
DMA_EnableAutoAlign(DMA_1_DMA_BASEADDR, DMA_1_ADC_DMA_CHANNEL, false);
DMA_EnableAsyncRequest(DMA_1_DMA_BASEADDR, DMA_1_ADC_DMA_CHANNEL, false);

Best Regards,

Marek Neuzil

0 Kudos

570 Views
gschelotto
Contributor V

Hi Marek,

Any news about a next software revision with the fixed issue? I'm facing the same problem than Palve.

regards,
gaston

0 Kudos

570 Views
marek_neuzil
NXP Employee
NXP Employee

Hi Gaston,

The reported issue has been fixed in the MCUXpresso Configuration Tools V4.1 release (published last week).

Please, check also my response above - the DMA peripheral component generate code into the peripheral.c file and the Pins tool provide the generated code in the pin_mux.c file. You should decide which tool you will use for the DMAMUX sources routing (otherwise duplicated code may cause another issue).

Best Regards,

Marek Neuzil

0 Kudos