MPC5748G-Problem of LinFlexUART with DMA

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MPC5748G-Problem of LinFlexUART with DMA

ソリューションへジャンプ
1,636件の閲覧回数
876152220
Contributor II

hi,

I need UART to transmit data with DMA,but there is a problem of UART initialization.When MCU run into the code of write register "LINFlexD_1.DMATXE", the MCU stop work and throw an exception of " No source available for "IVOR1_Vector() at 0x1001010" ".
The initialization code is below:

void initLINFlexD_1 ( unsigned int MegaHertz, unsigned int BaudRate )
{

unsigned int Fraction = 0;
unsigned int Integer = 0;
unsigned int i = 0;

SIUL2.MSCR[PC6].B.SSS = 1; /* Pad PC6: Source signal is LIN1_TX */
SIUL2.MSCR[PC6].B.OBE = 1; /* Pad PC6: OBE=1. */
SIUL2.MSCR[PC6].B.SRC = 3; /* Pad PC6: Full strength slew rate */
SIUL2.MSCR[PC7].B.IBE = 1; /* Pad PC7: Enable pad for input */
SIUL2.IMCR[201].B.SSS = 1; /* LIN1_RX : connected to pad PC9 */

LINFlexD_1.LINCR1.B.INIT = 1; /* Enter Initialization Mode */
LINFlexD_1.LINCR1.B.SLEEP = 0; /* Exit Sleep Mode */

while (0x1000 != (LINFlexD_1.LINSR.R & 0xF000)) {}

LINFlexD_1.UARTCR.B.UART = 1; /* UART Enable, Req'd before UART configuration */

LINFlexD_1.UARTCR.B.RxEn = 1;
LINFlexD_1.UARTCR.B.TxEn = 1;
LINFlexD_1.UARTCR.B.WL1 = 0;
LINFlexD_1.UARTCR.B.WL0 = 1;


LINFlexD_1.UARTCR.B.TFBM = 1;
LINFlexD_1.UARTCR.B.RFBM = 1;

LINFlexD_1.DMATXE.R = 0x0000ffff;//something is wrong here
LINFlexD_1.DMARXE.R = 0x0000ffff;

LINFlexD_1.LINIER.B.DTIE = 0;
LINFlexD_1.LINIER.B.DRIE = 1;

LINFlexD_1.UARTSR.B.SZF = 1; /* CHANGE THIS LINE Clear the Zero status bit */
LINFlexD_1.UARTSR.B.DRFRFE = 1; /* CHANGE THIS LINE Clear DRFRFE flag - W1C */

BaudRate = (MegaHertz * 1000000) / BaudRate;
Integer = BaudRate / 16;
Fraction = BaudRate - (Integer * 16);

LINFlexD_1.LINIBRR.R = Integer;
LINFlexD_1.LINFBRR.R = Fraction;

LINFlexD_1.LINCR1.B.INIT = 0; /* Exit Initialization Mode */

INTC.PSR[379].B.PRC_SELN = 0x8; /* IRQ sent to Core 0 */
INTC.PSR[379].B.PRIN = 8; /* IRQ priority = 10 (15 = highest) */

Lin_1_UARTFirstTransmitFlag = 1; /* Indicate no Tx has taken place yet */
for(i = 0; i < 1000; i++)
{}
}

The project is in accessory.Can any one help me how to solve this problem, or share some example code with me, thank you.
Best wishes!

1 解決策
1,410件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport
4 返答(返信)
901件の閲覧回数
AranZalewski
Contributor I

Restaurant menu prices are the prices listed on a restaurant's menu for their various dishes and beverages. These prices can vary depending on a variety of factors, such as the cost of ingredients, the location of the restaurant, and the restaurant's target market. Some restaurants also offer specials or discounts that can affect menu prices. Generally, prices can fluctuate on different time of the day, week and year, due to the demand and supply. Restaurants with a variety of pricing strategies depending on their target audience, the type of cuisine, level of service, and amenities. https://menupricelist.us/

https://menupricelist.us/
0 件の賞賛
返信
1,410件の閲覧回数
js9041985
Contributor I
0 件の賞賛
返信
1,411件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

please refer to https://community.nxp.com/message/1135074

BR, Petr

1,410件の閲覧回数
876152220
Contributor II

Thank you very much,it works.

0 件の賞賛
返信