INA behavior in PASM
T Chap
Posts: 4,223
I don't have a meter to check this right now, but am curious about something. I have set a debug section in PASM to monitor ina:
First, it sets the long to 0. Then it ORs the contents of INA to the byte, then sends to a serial terminal.
Nordic0_CE = 0 output
Nordic0_CSN = 1 output
Nordic0_SCK = 2 output
Nordic0_MOSI = 3 output
Nordic0_MISO = 4 input
Nordic0_IRQ = 5 input
But, I am getting a reading on INA of %0010_1011.
I know bit 5 is correct for the incoming value from the SPI device, but how am I seeing anything for the other bits that are set to outputs? Does INA still allow access to the pin's state even if set to output? I believe that bits 0 and 1 are correct as far as their output states for CE and CSN(both high).
mov dbg_parm , #0 or dbg_parm, ina 'cogcmd call #dbg_hex mov dbg_parm, #13 call #dbg_tx
First, it sets the long to 0. Then it ORs the contents of INA to the byte, then sends to a serial terminal.
Nordic0_CE = 0 output
Nordic0_CSN = 1 output
Nordic0_SCK = 2 output
Nordic0_MOSI = 3 output
Nordic0_MISO = 4 input
Nordic0_IRQ = 5 input
But, I am getting a reading on INA of %0010_1011.
I know bit 5 is correct for the incoming value from the SPI device, but how am I seeing anything for the other bits that are set to outputs? Does INA still allow access to the pin's state even if set to output? I believe that bits 0 and 1 are correct as far as their output states for CE and CSN(both high).
Comments