Our nRF52840 is connected via UARTE @ UART_1 to a modem which does not have a WAKE pin - the only method of waking it from sleep is to send a UART break. Is there any way to accomplish this on the nRF52840?
Our nRF52840 is connected via UARTE @ UART_1 to a modem which does not have a WAKE pin - the only method of waking it from sleep is to send a UART break. Is there any way to accomplish this on the nRF52840?
Dead simple: Program the lowest baud rate that the UART(E) peripherial supports, and then send a 0x00 byte.
If you cannot go low enough, re-program the IO pin to be normal GPIO output and pull it down manually - you will need a way to keep track of time, too.
Sorry for resurrecting this thread.
I have a similar problem but the proposed solution won't work with that as it would break the timing requirements.
In order to facilitate UARTE0 (at 250000 baud with 8bit no parity 2 stop bits) as a DMX512 controller I'd need a 100µs LOW 12µs HIGH level on the TX pin immediately followed by an up to 513 byte data train.
So reconfiguring the interface won't be an option.
Are there any alternative solutions?
BTW, I'm also faced with the problem that `nrf_uarte_configure()` doesn't seem to provide an option for setting 2 stop bits.
The MAB (Mark-after-break) is usually specified variable length (with a minimum) for DMX512.The devices on the bus simply wait for the next start bit.
If you really needed that tight timing consider using the PWM peripherial in order to create the waveform.
Thanks for the reply!
The 100µs + 12µs were meant to reflect the minimum lengths (plus some extra) and a "normal" reconfiguration did cause some unexpected noise on the lines, but since asking this question I've done some more digging and came up with an alternative "workaround" shown in my other question about 2 stop bit configuration here
In a nutshell I just disable the interface via `NRF_UARTE0->ENABLE = 0`, set the TX pin LOW, wait for a variable time and then reenable via `NRF_UARTE0->ENABLE = 8`. The reenabling takes about 14µs which works well with the min. 12µs MAB.
Thanks for the reply!
The 100µs + 12µs were meant to reflect the minimum lengths (plus some extra) and a "normal" reconfiguration did cause some unexpected noise on the lines, but since asking this question I've done some more digging and came up with an alternative "workaround" shown in my other question about 2 stop bit configuration here
In a nutshell I just disable the interface via `NRF_UARTE0->ENABLE = 0`, set the TX pin LOW, wait for a variable time and then reenable via `NRF_UARTE0->ENABLE = 8`. The reenabling takes about 14µs which works well with the min. 12µs MAB.