This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

softwareserial on nrf52

We create library for work with software serial, we use two modules gpiote, timer. We have done software serial one instance but we need four (actually just for rx). We don't understand how to solve the problem with bit banging more than just one softwareserial instance. We have some conflicts in timer handlers for different channel but use one timer per one softserial instance is too expensive. Could freertos helps us with that issues?

Parents
  • How exactly did you implement your soft serial ? My understanding is to use high frequency timer, and use CPU to read the pin on every pulse of the timer, to detect the start bit , stop bit and the data. And on each pulse of the timer the CPU read all 4 pins a the same time, so it doesn't matter if you have 4 UART or more.

    It's mor like a parallel port, but in this case you have only 4 bit, and start bit and stop bit has to be handled.

    But this solution requires the CPU to stay in the timer event handle most of the time. So what you are thinking of using external UART chip maybe a better solution.

Reply
  • How exactly did you implement your soft serial ? My understanding is to use high frequency timer, and use CPU to read the pin on every pulse of the timer, to detect the start bit , stop bit and the data. And on each pulse of the timer the CPU read all 4 pins a the same time, so it doesn't matter if you have 4 UART or more.

    It's mor like a parallel port, but in this case you have only 4 bit, and start bit and stop bit has to be handled.

    But this solution requires the CPU to stay in the timer event handle most of the time. So what you are thinking of using external UART chip maybe a better solution.

Children
No Data
Related