FlexCAN with DMA feature

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

FlexCAN with DMA feature

1,374 Views
engineer_attila
Contributor III

Hi folks,

I have MPC5775B based board.

I want to use Rx FIFO Transfer type to DMA mode instead of interrupt mode for FlexCAN module(or also if possible for MCAN).

I'm working over Matlab generated code.

Screenshot_1.png

I setuped simple MPC5775B project and try to use CAN Bus with EDMA feature(I set the FEATURE_CAN_HAS_DMA_ENABLE (1) on MPC5775B_features.h, and compile project without code regeneration)

ı got the compilation error.

>> !CAN_DMA.bat
 
C:\Users\xxxxxx\Desktop\NXP\CAN_DMA\CAN_DMA_mbd_rtw>set MATLAB=C:\Program Files\MATLAB\R2018b  
 
C:\Users\xxxxxx\Desktop\NXP\CAN_DMA\CAN_DMA_mbd_rtw>"C:\Program Files\MATLAB\R2018b\bin\win64\gmake" -f CAN_DMA.mk  GENERATE_ERT_S_FUNCTION=0 INCLUDE_MDL_TERMINATE_FCN=1 COMBINE_OUTPUT_UPDATE_FCNS=1 MULTI_INSTANCE_CODE=0 INTEGER_CODE=0 ISPROTECTINGMODEL=NOTPROTECTING  
Cleaning... 
RELATIVE_PATH_TO_ANCHOR is .. 
==== Removing object files from build directory ==== 
Copying necessary files to build directory... 
Compiler details : "C:\Users\xxxxxx\AppData\Roaming\MathWorks\Add_ons\Toolboxes\NXP_MBDToolbox_MPC57xx\tools/S32DS/build_tools/powerpc-eabivle-4_9/bin/powerpc-eabivle-gcc"  -DCPU_MPC5775B -mcpu=e200z7 -DSTART_FROM_FLASH --sysroot="C:\Users\xxxxxx\AppData\Roaming\MathWorks\Add_ons\Toolboxes\NXP_MBDToolbox_MPC57xx\tools/S32DS/build_tools/e200_ewl2" -g3 -mbig -mvle -O1 -mregnames -mlsp -specs=ewl_c9x.specs -mhard-float -Wall -c -std=c99 -fdata-sections -ffunction-sections -funsigned-char -fmessage-length=0 -nostdinc -fno-jump-tables  -DTURN_ON_CPU0 -I. -I.. -I../instrumented -I.. -I"C:\Program Files\MATLAB\R2018b\simulink\include" -I"C:\Program Files\MATLAB\R2018b\extern\include" -I"C:\Program Files\MATLAB\R2018b\rtw\c\src" -I"C:\Program Files\MATLAB\R2018b\rtw\c\libsrc" -I"C:\Program Files\MATLAB\R2018b\rtw\c\src\ext_mode\common" -I"C:\Program Files\MATLAB\R2018b\rtw\c\src\ext_mode\tcpip" -I"C:\Program Files\MATLAB\R2018b\rtw\c\src\ext_mode\serial" -I"C:\Program Files\MATLAB\R2018b\rtw\c\src\ext_mode\custom" -IC:\Users\xxxxxx\Desktop\NXP\CAN_DMA -IC:\Users\xxxxxx\Desktop\NXP\CAN_DMA\CAN_DMA_mbd_rtw -IC:\PROGRA~1\MATLAB\R2018b\extern\include -IC:\PROGRA~1\MATLAB\R2018b\simulink\include -IC:\PROGRA~1\MATLAB\R2018b\rtw\c\src -IC:\PROGRA~1\MATLAB\R2018b\rtw\c\src\ext_mode\common -IC:\PROGRA~1\MATLAB\R2018b\rtw\c\ert  -I"C:\Users\xxxxxx\AppData\Roaming\MathWorks\Add_ons\Toolboxes\NXP_MBDToolbox_MPC57xx\tools/S32DS/build_tools/e200_ewl2/EWL_C/include" -I"C:\Users\xxxxxx\AppData\Roaming\MathWorks\Add_ons\Toolboxes\NXP_MBDToolbox_MPC57xx\tools/S32DS/build_tools/e200_ewl2/EWL_C/include/pa"    -I"./common" -I"./inc" -I"./src/clock/MPC57xx" -I"./src/clock/MPC5777C" -I"./src/sim/MPC5775B" -I"./src/power/MPC57xx" -I"./src/pins/siul2" -I"./src/pins/siu" -I"./MPC5775B/include" -I"../common" -I"../inc" -I"../src/clock/MPC57xx" -I"../src/clock/MPC5777C" -I"../src/sim/MPC5775B" -I"../src/power/MPC57xx" -I"../src/pins/siul2" -I"../src/pins/siu" -I"../MPC5775B/include" -I"../instrumented/common" -I"../instrumented/inc" -I"../instrumented/src/clock/MPC57xx" -I"../instrumented/src/sim/MPC5775B" -I"../instrumented/src/power/MPC57xx" -I"../instrumented/src/pins/siul2" -I"../instrumented/MPC5775B/include"     
Assembler details : "C:\Users\xxxxxx\AppData\Roaming\MathWorks\Add_ons\Toolboxes\NXP_MBDToolbox_MPC57xx\tools/S32DS/build_tools/powerpc-eabivle-4_9/bin/powerpc-eabivle-gcc" -c  -g3 -mbig -mvle -mregnames  -DTURN_ON_CPU0  
Product: CAN_DMA.mot 
Build product type: executable 
Building file core0_intc_sw_handlers.o... 
"C:\Users\xxxxxx\AppData\Roaming\MathWorks\Add_ons\Toolboxes\NXP_MBDToolbox_MPC57xx\tools/S32DS/build_tools/powerpc-eabivle-4_9/bin/powerpc-eabivle-gcc" -c  -g3 -mbig -mvle -mregnames  -DTURN_ON_CPU0 -I..  -o core0_intc_sw_handlers.o core0_intc_sw_handlers.S 
Building file interrupt_vectors.o... 
"C:\Users\xxxxxx\AppData\Roaming\MathWorks\Add_ons\Toolboxes\NXP_MBDToolbox_MPC57xx\tools/S32DS/build_tools/powerpc-eabivle-4_9/bin/powerpc-eabivle-gcc" -c  -g3 -mbig -mvle -mregnames  -DTURN_ON_CPU0 -I..  -o interrupt_vectors.o interrupt_vectors.S 
Building file startup_MPC5775B.o... 
"C:\Users\xxxxxx\AppData\Roaming\MathWorks\Add_ons\Toolboxes\NXP_MBDToolbox_MPC57xx\tools/S32DS/build_tools/powerpc-eabivle-4_9/bin/powerpc-eabivle-gcc" -c  -g3 -mbig -mvle -mregnames  -DTURN_ON_CPU0 -I..  -o startup_MPC5775B.o startup_MPC5775B.S 
Building file CAN_DMA.o... 
"C:\Users\xxxxxx\AppData\Roaming\MathWorks\Add_ons\Toolboxes\NXP_MBDToolbox_MPC57xx\tools/S32DS/build_tools/powerpc-eabivle-4_9/bin/powerpc-eabivle-gcc"  -DCPU_MPC5775B -mcpu=e200z7 -DSTART_FROM_FLASH --sysroot="C:\Users\xxxxxx\AppData\Roaming\MathWorks\Add_ons\Toolboxes\NXP_MBDToolbox_MPC57xx\tools/S32DS/build_tools/e200_ewl2" -g3 -mbig -mvle -O1 -mregnames -mlsp -specs=ewl_c9x.specs -mhard-float -Wall -c -std=c99 -fdata-sections -ffunction-sections -funsigned-char -fmessage-length=0 -nostdinc -fno-jump-tables  -DTURN_ON_CPU0 -I. -I.. -I../instrumented -I.. -I"C:\Program Files\MATLAB\R2018b\simulink\include" -I"C:\Program Files\MATLAB\R2018b\extern\include" -I"C:\Program Files\MATLAB\R2018b\rtw\c\src" -I"C:\Program Files\MATLAB\R2018b\rtw\c\libsrc" -I"C:\Program Files\MATLAB\R2018b\rtw\c\src\ext_mode\common" -I"C:\Program Files\MATLAB\R2018b\rtw\c\src\ext_mode\tcpip" -I"C:\Program Files\MATLAB\R2018b\rtw\c\src\ext_mode\serial" -I"C:\Program Files\MATLAB\R2018b\rtw\c\src\ext_mode\custom" -IC:\Users\xxxxxx\Desktop\NXP\CAN_DMA -IC:\Users\xxxxxx\Desktop\NXP\CAN_DMA\CAN_DMA_mbd_rtw -IC:\PROGRA~1\MATLAB\R2018b\extern\include -IC:\PROGRA~1\MATLAB\R2018b\simulink\include -IC:\PROGRA~1\MATLAB\R2018b\rtw\c\src -IC:\PROGRA~1\MATLAB\R2018b\rtw\c\src\ext_mode\common -IC:\PROGRA~1\MATLAB\R2018b\rtw\c\ert  -I"C:\Users\xxxxxx\AppData\Roaming\MathWorks\Add_ons\Toolboxes\NXP_MBDToolbox_MPC57xx\tools/S32DS/build_tools/e200_ewl2/EWL_C/include" -I"C:\Users\xxxxxx\AppData\Roaming\MathWorks\Add_ons\Toolboxes\NXP_MBDToolbox_MPC57xx\tools/S32DS/build_tools/e200_ewl2/EWL_C/include/pa"    -I"./common" -I"./inc" -I"./src/clock/MPC57xx" -I"./src/clock/MPC5777C" -I"./src/sim/MPC5775B" -I"./src/power/MPC57xx" -I"./src/pins/siul2" -I"./src/pins/siu" -I"./MPC5775B/include" -I"../common" -I"../inc" -I"../src/clock/MPC57xx" -I"../src/clock/MPC5777C" -I"../src/sim/MPC5775B" -I"../src/power/MPC57xx" -I"../src/pins/siul2" -I"../src/pins/siu" -I"../MPC5775B/include" -I"../instrumented/common" -I"../instrumented/inc" -I"../instrumented/src/clock/MPC57xx" -I"../instrumented/src/sim/MPC5775B" -I"../instrumented/src/power/MPC57xx" -I"../instrumented/src/pins/siul2" -I"../instrumented/MPC5775B/include"     -o CAN_DMA.o CAN_DMA.c 
In file included from devassert.h:22:0, 
                 from device_registers.h:411, 
                 from CAN_DMA.h:24, 
                 from CAN_DMA.c:17: 
C:\Users\xxxxxx\AppData\Roaming\MathWorks\Add_ons\Toolboxes\NXP_MBDToolbox_MPC57xx\tools/S32DS/build_tools/e200_ewl2/EWL_C/include/stdbool.h:45:0: warning: "true" redefined 
  #define true       1 
 ^ 
In file included from CAN_DMA.h:23:0, 
                 from CAN_DMA.c:17: 
rtwtypes.h:27:0: note: this is the location of the previous definition 
 #   define true                        (1U) 
 ^ 
In file included from devassert.h:22:0, 
                 from device_registers.h:411, 
                 from CAN_DMA.h:24, 
                 from CAN_DMA.c:17: 
C:\Users\xxxxxx\AppData\Roaming\MathWorks\Add_ons\Toolboxes\NXP_MBDToolbox_MPC57xx\tools/S32DS/build_tools/e200_ewl2/EWL_C/include/stdbool.h:46:0: warning: "false" redefined 
  #define false       0 
 ^ 
In file included from CAN_DMA.h:23:0, 
                 from CAN_DMA.c:17: 
rtwtypes.h:23:0: note: this is the location of the previous definition 
 #   define false                       (0U) 
 ^ 
In file included from CAN_DMA.h:27:0, 
                 from CAN_DMA.c:17: 
flexcan_hw_access.h: In function 'FLEXCAN_SetRxFifoDMA': 
flexcan_hw_access.h:1208:31: error: 'CAN_MCR_DMA_MASK' undeclared (first use in this function) 
     base->MCR = (base->MCR & ~CAN_MCR_DMA_MASK) | CAN_MCR_DMA(enable? 1UL : 0UL); 
                               ^ 
flexcan_hw_access.h:1208:31: note: each undeclared identifier is reported only once for each function it appears in 
flexcan_hw_access.h:1208:5: warning: implicit declaration of function 'CAN_MCR_DMA' [-Wimplicit-function-declaration] 
     base->MCR = (base->MCR & ~CAN_MCR_DMA_MASK) | CAN_MCR_DMA(enable? 1UL : 0UL); 
     ^ 
CAN_DMA.c: In function 'CAN_DMA_initialize': 
CAN_DMA.c:126:62: warning: passing argument 3 of 'FLEXCAN_DRV_ConfigRxFifo' from incompatible pointer type 
     FLEXCAN_DRV_ConfigRxFifo(0, FLEXCAN_RX_FIFO_ID_FORMAT_A, &id_filter_table); 
                                                              ^ 
In file included from CAN_DMA.h:26:0, 
                 from CAN_DMA.c:17: 
flexcan_driver.h:716:6: note: expected 'const struct flexcan_id_table_t *' but argument is of type 'struct flexcan_id_table_t (*)[8]' 
 void FLEXCAN_DRV_ConfigRxFifo( 
      ^ 
gmake: *** [CAN_DMA.o] Error 1 
>> 

I also try same configuration on s32 Power Studio i couldn't change the Configuration List "RX FIFO Transfer type" Using Interrupts to Using DMA.

when i insert the below code on the MPC5775B.h within CAN MCR macros 

#define CAN_MCR_DMA_MASK                         0x8000u
#define CAN_MCR_DMA_SHIFT                        15u
#define CAN_MCR_DMA_WIDTH                        1u
#define CAN_MCR_DMA(x)                           (((uint32_t)(((uint32_t)(x))<<CAN_MCR_DMA_SHIFT))&CAN_MCR_DMA_MASK)

The error is disappear, but i'm not sure this is proper way to use DMA with FlexCAN

How can i use DMA mode instead of interrupts mode for MBDT based MPC5775B projects?

Regards,
Attila.

0 Kudos
Reply
1 Reply

235 Views
peter09
Contributor III

have you solved these  ?

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1496346%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EFlexCAN%20with%20DMA%20feature%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1496346%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20folks%2C%3C%2FP%3E%3CP%3EI%20have%20MPC5775B%20based%20board.%3C%2FP%3E%3CP%3EI%20want%20to%20use%20Rx%20FIFO%20Transfer%20type%20to%20DMA%20mode%20instead%20of%20interrupt%20mode%20for%20FlexCAN%20module(or%20also%20if%20possible%20for%20MCAN).%3C%2FP%3E%3CP%3EI'm%20working%20over%20Matlab%20generated%20code.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot_1.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot_1.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F188044iA28BCD4F60FB9074%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot_1.png%22%20alt%3D%22Screenshot_1.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI%20setuped%20simple%20MPC5775B%20project%20and%20try%20to%20use%20CAN%20Bus%20with%20EDMA%20feature(I%20set%20the%20FEATURE_CAN_HAS_DMA_ENABLE%20(1)%20on%20MPC5775B_features.h%2C%20and%20compile%20project%20without%20code%20regeneration)%3C%2FP%3E%3CP%3E%C4%B1%20got%20the%20compilation%20error.%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%26gt%3B%26gt%3B%20!CAN_DMA.bat%0A%20%0AC%3A%5CUsers%5Cxxxxxx%5CDesktop%5CNXP%5CCAN_DMA%5CCAN_DMA_mbd_rtw%26gt%3Bset%20MATLAB%3DC%3A%5CProgram%20Files%5CMATLAB%5CR2018b%20%20%0A%20%0AC%3A%5CUsers%5Cxxxxxx%5CDesktop%5CNXP%5CCAN_DMA%5CCAN_DMA_mbd_rtw%26gt%3B%22C%3A%5CProgram%20Files%5CMATLAB%5CR2018b%5Cbin%5Cwin64%5Cgmake%22%20-f%20CAN_DMA.mk%20%20GENERATE_ERT_S_FUNCTION%3D0%20INCLUDE_MDL_TERMINATE_FCN%3D1%20COMBINE_OUTPUT_UPDATE_FCNS%3D1%20MULTI_INSTANCE_CODE%3D0%20INTEGER_CODE%3D0%20ISPROTECTINGMODEL%3DNOTPROTECTING%20%20%0ACleaning...%20%0ARELATIVE_PATH_TO_ANCHOR%20is%20..%20%0A%3D%3D%3D%3D%20Removing%20object%20files%20from%20build%20directory%20%3D%3D%3D%3D%20%0ACopying%20necessary%20files%20to%20build%20directory...%20%0ACompiler%20details%20%3A%20%22C%3A%5CUsers%5Cxxxxxx%5CAppData%5CRoaming%5CMathWorks%5CAdd_ons%5CToolboxes%5CNXP_MBDToolbox_MPC57xx%5Ctools%2FS32DS%2Fbuild_tools%2Fpowerpc-eabivle-4_9%2Fbin%2Fpowerpc-eabivle-gcc%22%20%20-DCPU_MPC5775B%20-mcpu%3De200z7%20-DSTART_FROM_FLASH%20--sysroot%3D%22C%3A%5CUsers%5Cxxxxxx%5CAppData%5CRoaming%5CMathWorks%5CAdd_ons%5CToolboxes%5CNXP_MBDToolbox_MPC57xx%5Ctools%2FS32DS%2Fbuild_tools%2Fe200_ewl2%22%20-g3%20-mbig%20-mvle%20-O1%20-mregnames%20-mlsp%20-specs%3Dewl_c9x.specs%20-mhard-float%20-Wall%20-c%20-std%3Dc99%20-fdata-sections%20-ffunction-sections%20-funsigned-char%20-fmessage-length%3D0%20-nostdinc%20-fno-jump-tables%20%20-DTURN_ON_CPU0%20-I.%20-I..%20-I..%2Finstrumented%20-I..%20-I%22C%3A%5CProgram%20Files%5CMATLAB%5CR2018b%5Csimulink%5Cinclude%22%20-I%22C%3A%5CProgram%20Files%5CMATLAB%5CR2018b%5Cextern%5Cinclude%22%20-I%22C%3A%5CProgram%20Files%5CMATLAB%5CR2018b%5Crtw%5Cc%5Csrc%22%20-I%22C%3A%5CProgram%20Files%5CMATLAB%5CR2018b%5Crtw%5Cc%5Clibsrc%22%20-I%22C%3A%5CProgram%20Files%5CMATLAB%5CR2018b%5Crtw%5Cc%5Csrc%5Cext_mode%5Ccommon%22%20-I%22C%3A%5CProgram%20Files%5CMATLAB%5CR2018b%5Crtw%5Cc%5Csrc%5Cext_mode%5Ctcpip%22%20-I%22C%3A%5CProgram%20Files%5CMATLAB%5CR2018b%5Crtw%5Cc%5Csrc%5Cext_mode%5Cserial%22%20-I%22C%3A%5CProgram%20Files%5CMATLAB%5CR2018b%5Crtw%5Cc%5Csrc%5Cext_mode%5Ccustom%22%20-IC%3A%5CUsers%5Cxxxxxx%5CDesktop%5CNXP%5CCAN_DMA%20-IC%3A%5CUsers%5Cxxxxxx%5CDesktop%5CNXP%5CCAN_DMA%5CCAN_DMA_mbd_rtw%20-IC%3A%5CPROGRA~1%5CMATLAB%5CR2018b%5Cextern%5Cinclude%20-IC%3A%5CPROGRA~1%5CMATLAB%5CR2018b%5Csimulink%5Cinclude%20-IC%3A%5CPROGRA~1%5CMATLAB%5CR2018b%5Crtw%5Cc%5Csrc%20-IC%3A%5CPROGRA~1%5CMATLAB%5CR2018b%5Crtw%5Cc%5Csrc%5Cext_mode%5Ccommon%20-IC%3A%5CPROGRA~1%5CMATLAB%5CR2018b%5Crtw%5Cc%5Cert%20%20-I%22C%3A%5CUsers%5Cxxxxxx%5CAppData%5CRoaming%5CMathWorks%5CAdd_ons%5CToolboxes%5CNXP_MBDToolbox_MPC57xx%5Ctools%2FS32DS%2Fbuild_tools%2Fe200_ewl2%2FEWL_C%2Finclude%22%20-I%22C%3A%5CUsers%5Cxxxxxx%5CAppData%5CRoaming%5CMathWorks%5CAdd_ons%5CToolboxes%5CNXP_MBDToolbox_MPC57xx%5Ctools%2FS32DS%2Fbuild_tools%2Fe200_ewl2%2FEWL_C%2Finclude%2Fpa%22%20%20%20%20-I%22.%2Fcommon%22%20-I%22.%2Finc%22%20-I%22.%2Fsrc%2Fclock%2FMPC57xx%22%20-I%22.%2Fsrc%2Fclock%2FMPC5777C%22%20-I%22.%2Fsrc%2Fsim%2FMPC5775B%22%20-I%22.%2Fsrc%2Fpower%2FMPC57xx%22%20-I%22.%2Fsrc%2Fpins%2Fsiul2%22%20-I%22.%2Fsrc%2Fpins%2Fsiu%22%20-I%22.%2FMPC5775B%2Finclude%22%20-I%22..%2Fcommon%22%20-I%22..%2Finc%22%20-I%22..%2Fsrc%2Fclock%2FMPC57xx%22%20-I%22..%2Fsrc%2Fclock%2FMPC5777C%22%20-I%22..%2Fsrc%2Fsim%2FMPC5775B%22%20-I%22..%2Fsrc%2Fpower%2FMPC57xx%22%20-I%22..%2Fsrc%2Fpins%2Fsiul2%22%20-I%22..%2Fsrc%2Fpins%2Fsiu%22%20-I%22..%2FMPC5775B%2Finclude%22%20-I%22..%2Finstrumented%2Fcommon%22%20-I%22..%2Finstrumented%2Finc%22%20-I%22..%2Finstrumented%2Fsrc%2Fclock%2FMPC57xx%22%20-I%22..%2Finstrumented%2Fsrc%2Fsim%2FMPC5775B%22%20-I%22..%2Finstrumented%2Fsrc%2Fpower%2FMPC57xx%22%20-I%22..%2Finstrumented%2Fsrc%2Fpins%2Fsiul2%22%20-I%22..%2Finstrumented%2FMPC5775B%2Finclude%22%20%20%20%20%20%0AAssembler%20details%20%3A%20%22C%3A%5CUsers%5Cxxxxxx%5CAppData%5CRoaming%5CMathWorks%5CAdd_ons%5CToolboxes%5CNXP_MBDToolbox_MPC57xx%5Ctools%2FS32DS%2Fbuild_tools%2Fpowerpc-eabivle-4_9%2Fbin%2Fpowerpc-eabivle-gcc%22%20-c%20%20-g3%20-mbig%20-mvle%20-mregnames%20%20-DTURN_ON_CPU0%20%20%0AProduct%3A%20CAN_DMA.mot%20%0ABuild%20product%20type%3A%20executable%20%0ABuilding%20file%20core0_intc_sw_handlers.o...%20%0A%22C%3A%5CUsers%5Cxxxxxx%5CAppData%5CRoaming%5CMathWorks%5CAdd_ons%5CToolboxes%5CNXP_MBDToolbox_MPC57xx%5Ctools%2FS32DS%2Fbuild_tools%2Fpowerpc-eabivle-4_9%2Fbin%2Fpowerpc-eabivle-gcc%22%20-c%20%20-g3%20-mbig%20-mvle%20-mregnames%20%20-DTURN_ON_CPU0%20-I..%20%20-o%20core0_intc_sw_handlers.o%20core0_intc_sw_handlers.S%20%0ABuilding%20file%20interrupt_vectors.o...%20%0A%22C%3A%5CUsers%5Cxxxxxx%5CAppData%5CRoaming%5CMathWorks%5CAdd_ons%5CToolboxes%5CNXP_MBDToolbox_MPC57xx%5Ctools%2FS32DS%2Fbuild_tools%2Fpowerpc-eabivle-4_9%2Fbin%2Fpowerpc-eabivle-gcc%22%20-c%20%20-g3%20-mbig%20-mvle%20-mregnames%20%20-DTURN_ON_CPU0%20-I..%20%20-o%20interrupt_vectors.o%20interrupt_vectors.S%20%0ABuilding%20file%20startup_MPC5775B.o...%20%0A%22C%3A%5CUsers%5Cxxxxxx%5CAppData%5CRoaming%5CMathWorks%5CAdd_ons%5CToolboxes%5CNXP_MBDToolbox_MPC57xx%5Ctools%2FS32DS%2Fbuild_tools%2Fpowerpc-eabivle-4_9%2Fbin%2Fpowerpc-eabivle-gcc%22%20-c%20%20-g3%20-mbig%20-mvle%20-mregnames%20%20-DTURN_ON_CPU0%20-I..%20%20-o%20startup_MPC5775B.o%20startup_MPC5775B.S%20%0ABuilding%20file%20CAN_DMA.o...%20%0A%22C%3A%5CUsers%5Cxxxxxx%5CAppData%5CRoaming%5CMathWorks%5CAdd_ons%5CToolboxes%5CNXP_MBDToolbox_MPC57xx%5Ctools%2FS32DS%2Fbuild_tools%2Fpowerpc-eabivle-4_9%2Fbin%2Fpowerpc-eabivle-gcc%22%20%20-DCPU_MPC5775B%20-mcpu%3De200z7%20-DSTART_FROM_FLASH%20--sysroot%3D%22C%3A%5CUsers%5Cxxxxxx%5CAppData%5CRoaming%5CMathWorks%5CAdd_ons%5CToolboxes%5CNXP_MBDToolbox_MPC57xx%5Ctools%2FS32DS%2Fbuild_tools%2Fe200_ewl2%22%20-g3%20-mbig%20-mvle%20-O1%20-mregnames%20-mlsp%20-specs%3Dewl_c9x.specs%20-mhard-float%20-Wall%20-c%20-std%3Dc99%20-fdata-sections%20-ffunction-sections%20-funsigned-char%20-fmessage-length%3D0%20-nostdinc%20-fno-jump-tables%20%20-DTURN_ON_CPU0%20-I.%20-I..%20-I..%2Finstrumented%20-I..%20-I%22C%3A%5CProgram%20Files%5CMATLAB%5CR2018b%5Csimulink%5Cinclude%22%20-I%22C%3A%5CProgram%20Files%5CMATLAB%5CR2018b%5Cextern%5Cinclude%22%20-I%22C%3A%5CProgram%20Files%5CMATLAB%5CR2018b%5Crtw%5Cc%5Csrc%22%20-I%22C%3A%5CProgram%20Files%5CMATLAB%5CR2018b%5Crtw%5Cc%5Clibsrc%22%20-I%22C%3A%5CProgram%20Files%5CMATLAB%5CR2018b%5Crtw%5Cc%5Csrc%5Cext_mode%5Ccommon%22%20-I%22C%3A%5CProgram%20Files%5CMATLAB%5CR2018b%5Crtw%5Cc%5Csrc%5Cext_mode%5Ctcpip%22%20-I%22C%3A%5CProgram%20Files%5CMATLAB%5CR2018b%5Crtw%5Cc%5Csrc%5Cext_mode%5Cserial%22%20-I%22C%3A%5CProgram%20Files%5CMATLAB%5CR2018b%5Crtw%5Cc%5Csrc%5Cext_mode%5Ccustom%22%20-IC%3A%5CUsers%5Cxxxxxx%5CDesktop%5CNXP%5CCAN_DMA%20-IC%3A%5CUsers%5Cxxxxxx%5CDesktop%5CNXP%5CCAN_DMA%5CCAN_DMA_mbd_rtw%20-IC%3A%5CPROGRA~1%5CMATLAB%5CR2018b%5Cextern%5Cinclude%20-IC%3A%5CPROGRA~1%5CMATLAB%5CR2018b%5Csimulink%5Cinclude%20-IC%3A%5CPROGRA~1%5CMATLAB%5CR2018b%5Crtw%5Cc%5Csrc%20-IC%3A%5CPROGRA~1%5CMATLAB%5CR2018b%5Crtw%5Cc%5Csrc%5Cext_mode%5Ccommon%20-IC%3A%5CPROGRA~1%5CMATLAB%5CR2018b%5Crtw%5Cc%5Cert%20%20-I%22C%3A%5CUsers%5Cxxxxxx%5CAppData%5CRoaming%5CMathWorks%5CAdd_ons%5CToolboxes%5CNXP_MBDToolbox_MPC57xx%5Ctools%2FS32DS%2Fbuild_tools%2Fe200_ewl2%2FEWL_C%2Finclude%22%20-I%22C%3A%5CUsers%5Cxxxxxx%5CAppData%5CRoaming%5CMathWorks%5CAdd_ons%5CToolboxes%5CNXP_MBDToolbox_MPC57xx%5Ctools%2FS32DS%2Fbuild_tools%2Fe200_ewl2%2FEWL_C%2Finclude%2Fpa%22%20%20%20%20-I%22.%2Fcommon%22%20-I%22.%2Finc%22%20-I%22.%2Fsrc%2Fclock%2FMPC57xx%22%20-I%22.%2Fsrc%2Fclock%2FMPC5777C%22%20-I%22.%2Fsrc%2Fsim%2FMPC5775B%22%20-I%22.%2Fsrc%2Fpower%2FMPC57xx%22%20-I%22.%2Fsrc%2Fpins%2Fsiul2%22%20-I%22.%2Fsrc%2Fpins%2Fsiu%22%20-I%22.%2FMPC5775B%2Finclude%22%20-I%22..%2Fcommon%22%20-I%22..%2Finc%22%20-I%22..%2Fsrc%2Fclock%2FMPC57xx%22%20-I%22..%2Fsrc%2Fclock%2FMPC5777C%22%20-I%22..%2Fsrc%2Fsim%2FMPC5775B%22%20-I%22..%2Fsrc%2Fpower%2FMPC57xx%22%20-I%22..%2Fsrc%2Fpins%2Fsiul2%22%20-I%22..%2Fsrc%2Fpins%2Fsiu%22%20-I%22..%2FMPC5775B%2Finclude%22%20-I%22..%2Finstrumented%2Fcommon%22%20-I%22..%2Finstrumented%2Finc%22%20-I%22..%2Finstrumented%2Fsrc%2Fclock%2FMPC57xx%22%20-I%22..%2Finstrumented%2Fsrc%2Fsim%2FMPC5775B%22%20-I%22..%2Finstrumented%2Fsrc%2Fpower%2FMPC57xx%22%20-I%22..%2Finstrumented%2Fsrc%2Fpins%2Fsiul2%22%20-I%22..%2Finstrumented%2FMPC5775B%2Finclude%22%20%20%20%20%20-o%20CAN_DMA.o%20CAN_DMA.c%20%0AIn%20file%20included%20from%20devassert.h%3A22%3A0%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20from%20device_registers.h%3A411%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20from%20CAN_DMA.h%3A24%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20from%20CAN_DMA.c%3A17%3A%20%0AC%3A%5CUsers%5Cxxxxxx%5CAppData%5CRoaming%5CMathWorks%5CAdd_ons%5CToolboxes%5CNXP_MBDToolbox_MPC57xx%5Ctools%2FS32DS%2Fbuild_tools%2Fe200_ewl2%2FEWL_C%2Finclude%2Fstdbool.h%3A45%3A0%3A%20warning%3A%20%22true%22%20redefined%20%0A%20%20%23define%20true%20%20%20%20%20%20%201%20%0A%20%5E%20%0AIn%20file%20included%20from%20CAN_DMA.h%3A23%3A0%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20from%20CAN_DMA.c%3A17%3A%20%0Artwtypes.h%3A27%3A0%3A%20note%3A%20this%20is%20the%20location%20of%20the%20previous%20definition%20%0A%20%23%20%20%20define%20true%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20(1U)%20%0A%20%5E%20%0AIn%20file%20included%20from%20devassert.h%3A22%3A0%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20from%20device_registers.h%3A411%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20from%20CAN_DMA.h%3A24%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20from%20CAN_DMA.c%3A17%3A%20%0AC%3A%5CUsers%5Cxxxxxx%5CAppData%5CRoaming%5CMathWorks%5CAdd_ons%5CToolboxes%5CNXP_MBDToolbox_MPC57xx%5Ctools%2FS32DS%2Fbuild_tools%2Fe200_ewl2%2FEWL_C%2Finclude%2Fstdbool.h%3A46%3A0%3A%20warning%3A%20%22false%22%20redefined%20%0A%20%20%23define%20false%20%20%20%20%20%20%200%20%0A%20%5E%20%0AIn%20file%20included%20from%20CAN_DMA.h%3A23%3A0%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20from%20CAN_DMA.c%3A17%3A%20%0Artwtypes.h%3A23%3A0%3A%20note%3A%20this%20is%20the%20location%20of%20the%20previous%20definition%20%0A%20%23%20%20%20define%20false%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20(0U)%20%0A%20%5E%20%0AIn%20file%20included%20from%20CAN_DMA.h%3A27%3A0%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20from%20CAN_DMA.c%3A17%3A%20%0Aflexcan_hw_access.h%3A%20In%20function%20'FLEXCAN_SetRxFifoDMA'%3A%20%0Aflexcan_hw_access.h%3A1208%3A31%3A%20error%3A%20'CAN_MCR_DMA_MASK'%20undeclared%20(first%20use%20in%20this%20function)%20%0A%20%20%20%20%20base-%26gt%3BMCR%20%3D%20(base-%26gt%3BMCR%20%26amp%3B%20~CAN_MCR_DMA_MASK)%20%7C%20CAN_MCR_DMA(enable%3F%201UL%20%3A%200UL)%3B%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5E%20%0Aflexcan_hw_access.h%3A1208%3A31%3A%20note%3A%20each%20undeclared%20identifier%20is%20reported%20only%20once%20for%20each%20function%20it%20appears%20in%20%0Aflexcan_hw_access.h%3A1208%3A5%3A%20warning%3A%20implicit%20declaration%20of%20function%20'CAN_MCR_DMA'%20%5B-Wimplicit-function-declaration%5D%20%0A%20%20%20%20%20base-%26gt%3BMCR%20%3D%20(base-%26gt%3BMCR%20%26amp%3B%20~CAN_MCR_DMA_MASK)%20%7C%20CAN_MCR_DMA(enable%3F%201UL%20%3A%200UL)%3B%20%0A%20%20%20%20%20%5E%20%0ACAN_DMA.c%3A%20In%20function%20'CAN_DMA_initialize'%3A%20%0ACAN_DMA.c%3A126%3A62%3A%20warning%3A%20passing%20argument%203%20of%20'FLEXCAN_DRV_ConfigRxFifo'%20from%20incompatible%20pointer%20type%20%0A%20%20%20%20%20FLEXCAN_DRV_ConfigRxFifo(0%2C%20FLEXCAN_RX_FIFO_ID_FORMAT_A%2C%20%26amp%3Bid_filter_table)%3B%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5E%20%0AIn%20file%20included%20from%20CAN_DMA.h%3A26%3A0%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20from%20CAN_DMA.c%3A17%3A%20%0Aflexcan_driver.h%3A716%3A6%3A%20note%3A%20expected%20'const%20struct%20flexcan_id_table_t%20*'%20but%20argument%20is%20of%20type%20'struct%20flexcan_id_table_t%20(*)%5B8%5D'%20%0A%20void%20FLEXCAN_DRV_ConfigRxFifo(%20%0A%20%20%20%20%20%20%5E%20%0Agmake%3A%20***%20%5BCAN_DMA.o%5D%20Error%201%20%0A%26gt%3B%26gt%3B%20%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EI%20also%20try%20same%20configuration%20on%20s32%20Power%20Studio%20i%20couldn't%20change%20the%20Configuration%20List%20%22RX%20FIFO%20Transfer%20type%22%20Using%20Interrupts%20to%20Using%20DMA.%3C%2FP%3E%3CP%3Ewhen%20i%20insert%20the%20below%20code%20on%20the%20MPC5775B.h%20within%20CAN%20MCR%20macros%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%23define%20CAN_MCR_DMA_MASK%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200x8000u%0A%23define%20CAN_MCR_DMA_SHIFT%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2015u%0A%23define%20CAN_MCR_DMA_WIDTH%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%201u%0A%23define%20CAN_MCR_DMA(x)%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20(((uint32_t)(((uint32_t)(x))%26lt%3B%3CCAN_MCR_DMA_SHIFT%3E%3C%2FCAN_MCR_DMA_SHIFT%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EThe%20error%20is%20disappear%2C%20but%20i'm%20not%20sure%20this%20is%20proper%20way%20to%20use%20DMA%20with%20FlexCAN%3C%2FP%3E%3CP%3EHow%20can%20i%20use%20DMA%20mode%20instead%20of%20interrupts%20mode%20for%20MBDT%20based%20MPC5775B%20projects%3F%3C%2FP%3E%3CP%3ERegards%2C%3CBR%20%2F%3EAttila.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2149723%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20FlexCAN%20with%20DMA%20feature%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2149723%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ehave%20you%20solved%20these%26nbsp%3B%20%3F%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E