Hi,
I am creating code for radio on nRF52840 without using SoftDevice. I want to secure packets using CCM periphery. In the nRF52840 documentation I found a CCM structure overview (see image below) that I have questions about.

- Does the packet counter (PKTCTR) automatically increments, when packet is encrypted or does it need to be incremented by software?
- How often initialization vector (IV) need to be re-generated? I plan to use RNG for updating the IV field, which would take ~1ms. If the IV field has to be re-generated each time, the packet is encrypted/decrypted, it will create ~1ms spacing between each transmitted packet, which is a lot.
- How to use the Direction bit, if my implementation won't have master/slave device, as Bluetooth has. Can it be set by random?
Thank you all for the answers.