I urgently need to fix an old project with FCV6 to change the UART baudrate in runtime from 38400 to 4800 and back,
using an ATMega328.
I found a post about this problem, but this solution doesn't seem to work.
Calling the FC macro within C-code with parameter 2 stops working with 38400 Baud,
but doesn't work on 4800 Baud. Changing it back to 38400, the UART doesn't work here anymore also.
Did I miss anything??
Any help would be appreciated!
Many thanks!!
Code: Select all
/*=----------------------------------------------------------------------=*\
Use :Changes the hardware UART baud rate allowing for dynamic speed changes.
:
:Parameters for macro ChangeHWBaud:
: NewBaud : 0=1200, 1=2400, 2=4800, 3=9600, 4=19200, 5=38400, 6=57600, 7=115200
\*=----------------------------------------------------------------------=*/
void FCD_047b1_RS232__ChangeHWBaud(MX_UINT8 FCL_NEWBAUD)
{
FC_CAL_UART_UpdateBaud_1(FCL_NEWBAUD);
}