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

ISO 7816 using UART

I need to implement an ISO 7816 peripheral on my nRF52832. Preferably, I'd like to leverage the existing UART driver (maybe app_serial?) so that I don't have to bit-bang the entire thing. I found devzone.nordicsemi.com/.../ mentioning how to get a clock signal on the clock line and devzone.nordicsemi.com/.../ with some hints about using a single line for input and output. I'm still completely lost, however, on where to start and how to test if I'm on the right path. Any input greatly appreciated.

Parents
  • You won't make any bitbanging thing work with BLE stack active. It runs with higher priority and will take time to process the event which can take as long as several milliseconds. So you will need to make ISO7816 work with DMA enabled HW UART block as is (which is unlikely) or do it only at the moment when stack is inactive. Which should be possible because your will be master talking to secure element when you want... with some challenges (like long processing on SE side) of course. There is also time-slot API in Nordic BLE stack which can help you to get guaranteed interval without interrupting by the stack (with some drawbacks to throughput of course, see the documentation).

Reply
  • You won't make any bitbanging thing work with BLE stack active. It runs with higher priority and will take time to process the event which can take as long as several milliseconds. So you will need to make ISO7816 work with DMA enabled HW UART block as is (which is unlikely) or do it only at the moment when stack is inactive. Which should be possible because your will be master talking to secure element when you want... with some challenges (like long processing on SE side) of course. There is also time-slot API in Nordic BLE stack which can help you to get guaranteed interval without interrupting by the stack (with some drawbacks to throughput of course, see the documentation).

Children
No Data
Related