Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


SW4STM32 UART is not working

I am attaching the main() below, please find below:

int main(void)
{
/* Enable the CPU Cache */
CPU_CACHE_Enable();

/* STM32F7xx HAL library initialization:
- Configure the Flash prefetch
- Systick timer is configured by default as source of time base, but user
can eventually implement his proper time base source (a general purpose
timer for example or other time source), keeping in mind that Time base
duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and
handled in milliseconds basis.
- Set NVIC Group Priority to 4
- Low Level Initialization
*/
HAL_Init();

/* Configure the System clock to 216 MHz */
SystemClock_Config();

/* Initialize LEDs */
BSP_LED_Init(LED1);
BSP_LED_Init(LED2);
BSP_LED_Init(LED3);

/*##-1- Configure the UART peripheral ######################################*/
/* Put the USART peripheral in the Asynchronous mode (UART Mode) */
/* UART configured as follows:
- Word Length = 8 Bits (7 data bit + 1 parity bit) :
BE CAREFUL : Program 7 data bits + 1 parity bit in PC HyperTerminal
- Stop Bit = One Stop bit
- Parity = ODD parity
- BaudRate = 9600 baud
- Hardware flow control disabled (RTS and CTS signals) */
UartHandle.Instance = USARTx;

UartHandle.Init.BaudRate = 9600;
UartHandle.Init.WordLength = UART_WORDLENGTH_8B;
UartHandle.Init.StopBits = UART_STOPBITS_1;
UartHandle.Init.Parity = UART_PARITY_NONE;
UartHandle.Init.HwFlowCtl = UART_HWCONTROL_NONE;
UartHandle.Init.Mode = UART_MODE_TX_RX;
UartHandle.Init.OverSampling = UART_OVERSAMPLING_16;

BSP_LED_On(LED3);

//for(uint32_t i= 0; i

France

Be careful, you program the UART to transmit/receive 8 DATA bits without parity. The wordlength parameter is the number of useful data bits sent and the parity (if required) is after these 8 bits, not included in them.
Note that you said you wanted 7 bits + ODD parity, but programmed the UART to work 8 bits without parity...

So if you program Hyperterminal (or any better terminal emulator like teraterm) with 7 databits PLUS parity, choose ODD parity and be sure all the bytes that you send have an odd number of 1 bits as any byte with incorrect parity will be rejected by the terminal emulator...


Hello sir,

Thank you for the post. I am sending the 7-bit data and with that I am sending the odd parity bit for error checking, so total it’s an 8-bit word. The issue is that this same code is working in IAR System Workbench software but this isn’t working in the SW4STM32 software. I am using msp.c functions in the main(). While debugging, the code goes in the infinite loop after UARTGetState(). Don’t know why this same code is working with IAR and Keil but not in SW4STM32.

Please help.