the macros I provided earlier are for generic applications -> it can even take variable ports or bits. for fixed ports / bits, you can speed up the speed significantly by precalculating the alliasing address and operate on that address. This will require minor changes to the set of macros I provided...
I remember using bit banding on luminary LM3S and TI LM4F chips. Based on my benchmarking then they aren't faster than BRR and BSRR. The better approach I think is the implementation of SET, CLR and INV registers on pic32. Bit banding is optional for CM0 I think. I have never seen a cM0 chip with bi...
but how mutch slow? 1. the issue here isn't nearly as much HAL. but more in the arduino implementation. I have written quite extensively about this, but in general, the arduino implementation is 20x to 50x slower than the direct register access. 2. your particular implementation isn't optimal: you ...
Our codes are identical. In my case, I used this to initialize BKP0R in setup(): //tamper / backup registers bkpInit(); //reset the tamper if (bkp0Get()==0) bkp0Set(1); //reset backup register - only during the first wrong and I incremented theh value in BKP0R and I could watch it continued to incre...
I can confirm that it works as well on my G0: //unlock the domain //on some chips, it requires a set of magic numbers #define bkpUnlock() do {PWR->CR1 |= PWR_CR1_DBP;} while (!(PWR->CR1 & PWR_CR1_DBP)) //1->enable write assess, 0->disable write assess #define bkpLock() do {PWR->CR1 &=~PWR_CR...