cancel
Showing results for 
Search instead for 
Did you mean: 

MAX3232 Stops Translating When STM32L0 Running

nobbyv77
Associate II

I'm trying to interface a L0538 Discovery board to a simple TTL-to-RS232 converter board that uses a MAX3232 IC (off-the-shelf from Amazon). I have VCC, GND and TX/RX from the Discovery board (UART1) wired to the converter board. I used Cube to set up a simple project, and a USB-to-RS232 cable plugged into my PC with a terminal program running (Putty).

If I power the converter board from a benchtop power supply, all is well: I can send data through Putty and see it on the output pin of the MAX3232. Similarly, if I start debugging (STM32 IDE) using the STLink connection on the Discovery board but don't actually run it, all is well. But as soon as I start running the project, I get NO output from the MAX3232 (verified on a scope). I simplified the project down to an empty while loop. So all it does is init the HAL, the UART and and LED and then just sit there. But when it's running, there is no output on pin 12 of the MAX3232.

I didn't set any pullups or anything on the UART pins; I just let Cube handle it. What could possibly be the problem? Clock interference?

  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  HAL_Init();
 
  /* Configure the system clock */
  SystemClock_Config();
 
  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  //MX_DMA_Init();
  MX_USART1_UART_Init();
 // MX_USART2_UART_Init();
 // __enable_irq();
 
  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
  uint8_t PktTracker = 0;
  uint8_t DeviceState = FALSE;
 
  while (1)
  {
    /* USER CODE END WHILE */
  }

0 REPLIES 0