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

Pulse, timer and UART with GPIOTE and PPI

Hello,

My problem statement is something like this:

    • Implement a Transmit Enable (TxEn) on a GPIO pin.
    • TxEn should be initialized low.
    • TxEn should be pulled high 30us before the first start bit transmission begins.
    • TxEn should remain high during serial transmission of multiple bytes.
    • TxEn should be pulled low 60us after the last stop is transmitted.
    • TxEn handling and serial transmission should not substantially block main program execution.

I figured I need to use the GPIOTE and PPI functionality. 

My question is that since I have 3 functions to take care of: GPIO transition, timer compare and UART start/stop, how best can I utilize GPIOTE and PPI to accomplish this.

Option 1: Event - GPIO low to high, Task- timer compare and then start UART

Option 2: Set GPIO high,  Event - Timer compare, Task- UART start

What approach should I follow? Is there another option,  is there a way to use all 3 in a GPIOTE-PPI combination?

Thanks

Parents Reply Children
No Data
Related