I would like to interface one of the UART's to a Half Duplex RS485 link. Specifically this would be for Modbus RTU communication at 115200 baud. You could use an interupt handler in the TC bit of the UART to toggle a GPIO line off at the end of transmission, but would need to set this GPIO at the start of transmission. It doesn't look like the STM32 chip provides direct hardware support for toggling a TX_EN line like some chips do. Any idea's how I might go about doing this?
Also can I set non standard baud rates like 250,000 baud (DMX) and 31,250 (MIDI) for the UARTS, I'm guessing you can as they have fractional divisors for the baud rate generators.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I would like to interface one of the UART's to a Half Duplex RS485 link. Specifically this would be for Modbus RTU communication at 115200 baud. You could use an interupt handler in the TC bit of the UART to toggle a GPIO line off at the end of transmission, but would need to set this GPIO at the start of transmission. It doesn't look like the STM32 chip provides direct hardware support for toggling a TX_EN line like some chips do. Any idea's how I might go about doing this?
Also can I set non standard baud rates like 250,000 baud (DMX) and 31,250 (MIDI) for the UARTS, I'm guessing you can as they have fractional divisors for the baud rate generators.