--some updates

This commit is contained in:
Mysteo
2023-07-14 19:21:22 +03:00
parent 5c26bb8dff
commit 5f7dcde4af
21 changed files with 22075 additions and 406 deletions

View File

@@ -29,9 +29,13 @@
/****************************************************************************************
* Include files
****************************************************************************************/
#include "header.h" /* generic header */
extern "C" {
#include "header.h" /* generic header */
}
#include "uart_bridge.hpp"
UartBridge bridge(true, USART1, USART2, 9600, 9600);
/************************************************************************************//**
** \brief Initializes the user program application. Should be called once during
** software program initialization.
@@ -45,7 +49,10 @@ void AppInit(void)
/* Initialize the led driver. */
LedInit();
/* initialize the bootloader interface */
bridge.init();
/*
BootComInit();
*/
} /*** end of AppInit ***/
@@ -57,11 +64,13 @@ void AppInit(void)
****************************************************************************************/
void AppTask(void)
{
/* Toggle LED with a fixed frequency. */
LedToggle();
/* check for bootloader activation request */
/*
BootComCheckActivationRequest();
*/
} /*** end of AppTask ***/
/*********************************** end of app.c **************************************/
//////////// FINALLY NEED TO UNCOMMENT BootComCheckActivationRequest and BootComInit for success firmwaare update from HOST

View File

@@ -115,7 +115,7 @@ static unsigned char Rs232ReceiveByte(unsigned char *data);
static void BootComRs232Init(void)
{
/* Configure UART peripheral. */
rs232Handle.Instance = USART2;
rs232Handle.Instance = USART1;
rs232Handle.Init.BaudRate = BOOT_COM_RS232_BAUDRATE;
rs232Handle.Init.WordLength = UART_WORDLENGTH_8B;
rs232Handle.Init.StopBits = UART_STOPBITS_1;