MCUXpresso FRDM MCXN947 macro's

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MCUXpresso FRDM MCXN947 macro's

375 次查看
Kevin_Pang
Contributor I

Dear NXP Community,

I am currently working on a DMA transfer from memory to GPIO pin. However, when running the code, I get an assertion failed error ending in a loop with "__BKPT(0);". I am now configuring the security considerations (section 23.1.4 of reference manual). I think the problem lies in the fact that my DMA channel and memory are not configured in the same security mode (secure/non-secure). To perform the steps in 23.1.4 of the reference manual, i will set some registers. This can be mostly done with the defined macro's in for example PERI.DMA.h file. I came accross for example this macro:

#define AHBSC_MASTER_SEC_LEVEL_EDMA0_MASK (0xC0U)

#define AHBSC_MASTER_SEC_LEVEL_EDMA0_SHIFT (6U)

/*! eDMA0 - eDMA0

* 0b00..Non-secure and non-privileged Master

* 0b01..Non-secure and privileged Master

* 0b10..Secure and non-privileged Master

* 0b11..Secure and privileged Master

*/

#define AHBSC_MASTER_SEC_LEVEL_EDMA0(x) (((uint32_t)(((uint32_t)(x)) << AHBSC_MASTER_SEC_LEVEL_EDMA0_SHIFT)) & AHBSC_MASTER_SEC_LEVEL_EDMA0_MASK)

I am not sure what the the parameter x should indicate. Also in general, there are many macro's with such x as input parameter, however it is mostly not defined what the x is.

Does anyone know how I should interpret the x in this particular case and in general?

 

Kind regards,

Kevin Pang

 

 

0 项奖励
回复
1 回复

348 次查看
Pablo_Ramos
NXP Employee
NXP Employee

Hi @Kevin_Pang 

In this case the x is the secure level you want to set the eDMA0.

For further information regarding the registers the definitions are modifying you can search it on MCX Nx4x Security Reference Manual

Pablo_Ramos_0-1749158876131.png

Best Regards,
Pablo

0 项奖励
回复