Skip to main content
GGran.2
Associate III
July 19, 2021
Solved

Hello, I'm trying to transmit and receive via DMA UART on SPC58EC-DISP. On the other side there is a STM32L432KC: the SPC transmit to STM32 which receives the message, but the message transmitted to SPC by the STM32 is not received. I post the code

  • July 19, 2021
  • 1 reply
  • 879 views

#include "components.h"

#include "serial_lld_cfg.h"

void sddmatxcb(SerialDriver *sdp) {

 (void)sdp;

 pal_lld_togglepad(PORT_F, PF_LED2);

}

void sddmarxcb(SerialDriver *sdp) {

 (void)sdp;

 pal_lld_togglepad(PORT_F, PF_LED1);

}

/*

 * Application entry point.

 */

int main(void) {

uint8_t message= 3;

 /* Initialization of all the imported components in the order specified in

   the application wizard. The function is generated automatically.*/

 componentsInit();

 /* Enable Interrupts */

 irqIsrEnable();

 /*

  * Activates the serial driver 1 using the driver default configuration.

  */

 sd_lld_start(&SD1, &serial_config_sddmacfg);

 /* Application main loop.*/

 for ( ; ; ) {

(void)sd_lld_write(&SD1,&message,1);

  osalThreadDelayMilliseconds(500);

 }

}

    This topic has been closed for replies.
    Best answer by Erwan YVIN

    Hello ,

    Sorry , for the late answer.

    i recommend to use a protocol analyzer in UART with the debugger (PLS) to check if the data are well transmitted or not.

    Best Regards

    Erwan

    1 reply

    Erwan YVIN
    Erwan YVINBest answer
    ST Technical Moderator
    December 3, 2021

    Hello ,

    Sorry , for the late answer.

    i recommend to use a protocol analyzer in UART with the debugger (PLS) to check if the data are well transmitted or not.

    Best Regards

    Erwan

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.