2017-08-31 08:07 PM
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