UART

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

UART

465 次查看
jacewalton
Contributor III

I am using the MK22F board with Jeggar Bootlaoder, Kinetis Design studio 3 and KSDK 1.3 to do UART.

I have uart debug on UART0 

UART) works fine. UART1 and UART2 do no work.

 

 

uint8_t sourceBuff[] = "jkl"; // sourceBuff can be filled out with desired data
uint8_t readBuffer[10] = {0}; // readBuffer gets filled with UART_DRV_ReceiveData function
uint8_t byteCount = sizeof(sourceBuff);
uint8_t rxRemainingSize = sizeof(readBuffer);
uint32_t bytes = 2;
uint8_t *psourceBuff = &sourceBuff;

 

UART_DRV_SendData(UART1_INSTANCE, psourceBuff, 1u);

 

the output is....

 

jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj

 

 only the first character, 8 characters at a time. 

 

UART_DRV_Init() function is called but the code automatically generated by processor expert. as is TX_CALLBACK()

 

am I missing something

I have tried 

 

UART_DRV_SendData(UART1_INSTANCE, sourceBuff, 1u);

UART_DRV_SendData(UART1_INSTANCE, psourceBuff, 1u);

UART_DRV_SendData(UART1_INSTANCE, &sourceBuff, 1u);

 

as well as startign a new black project... what to do now?

thanks!

标签 (1)
标记 (3)
0 项奖励
0 回复数