I wish to implement Pin_write() & pin_read() by register manipulation. Can ayone help?
You are probably not going to get the accuracy by using the BSP_software delay function or by writing to the PCNTR3 in an ISR. The ISR latency within the SSP is relatively high and access to the port pin…
I use these instructions for example on P000:
R_IOPORT0->PCNTR1 = 0x00000001; //P000 = 1
R_IOPORT0->PCNTR1 = 0x00000000; //P000 = 0