Problem when transfering Data between 2 UART Ports
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2017-08-31 8:07 PM
Posted on September 01, 2017 at 05:07
Hi,
im try to transfer Data through 2 UART ports. but the problem is only the first element of the Data received.
my model is like this. sent [50 1 1 52]or[50 2 2 52] through USART1 and receive it from USART3.
Both USART buffer size is 4
ToolChain used is EWARM.
Matlab Function: generateBuff
function [NbChar, Buff] = generateBuff(u1)
if coder.target('Sfun')
% Executing in MATLAB, Buff is null Buff = uint32(0); NbChar = uint16(0);else
% Executing in the generated code. Buff = uint32(0); Buff = coder.ceval('getBuffPtr',uint8(u1)); [nbChar,~] = size(u1); NbChar = uint16(nbChar);end
endi expect to receive[50 1 1 52], but actually i receive [50 0 0 0], like below
usart1TestRcvChar_B.USART_Receive_o3 = ['2'(0x32),'\0'(0x00),'\0'(0x00),'\0'(0x00)]
where shoud i modified?
#stm32f4-usart
Labels:
- Labels:
-
UART-USART
This discussion is locked. Please start a new topic to ask your question.
0 REPLIES 0
