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

nrf8001 reset

BobLouwe.logicdataHi devs,

I'm setting up my own .NET mircro framework stack for the Adafruit nRF8001 Break Out board. When write the Reset port I do get an interrupt on the Ready port, but when I start reading from the SPI I getting all 0xFF. When I send a Test command (0x02, 0x01, 0x02) and put the REQN low (or REQ high) I do get the interrupt on the Ready port, but reading from the SPI gives me all 0x00.

I assume my SPI is not configured correctly, but I've read the documentation and it seems to be correct.

Thanks.

EDIT:

Capture file Reset and initial bytes

EDIT: Bob Louwe clock low.logicdata

Parents
  • Here is my setup code (.NET MF/C#):

    ` private const bool SpiChipSelectActiveState = true; // set signal to low when accessing chip private const int SpiChipSelectSetupTime = 0; private const int SpiChipSelectHoldTime = 0; private const bool SpiClockIdleState = false; // set signal to low when not accessing chip private const bool SpiClockEdge = true; // sample data on rising edge private const int SpiClockRateKHz = 2000;

        private InterruptPort _dataReadyPort;
        private const bool DataReadyGlitchFilter = false;
    
        private OutputPort _resetPort;
        private const bool ResetInitialState = false;
    
        private OutputPort _reqPort;
        private const bool ReqInitialState = false;
    
        _spiConfiguration = new SPI.Configuration(Cpu.Pin.GPIO_NONE, SpiChipSelectActiveState, SpiChipSelectSetupTime,
                SpiChipSelectHoldTime, SpiClockIdleState, SpiClockEdge, SpiClockRateKHz, spiModule);
    
            _resetPort = new OutputPort(resetPin, ResetInitialState);
            _reqPort = new OutputPort(reqPin, ReqInitialState);
    
            _dataReadyPort = new InterruptPort(dataReadyPin, DataReadyGlitchFilter, Port.ResistorMode.PullUp,
                Port.InterruptMode.InterruptEdgeHigh);
            _dataReadyPort.OnInterrupt += HandleDataReady;
    

    `

    After this code I set the _resetPort high and the HandleDataReady is called. In the HandleDataReady I create the SPI and start reading. Note that the chip select port is set to GPIO_NONE since the chip select is handled by the _reqPort. All other SpiChipSelect...-parameters should be read as don't care, I assume.

    I cannot use the 'transport layer verification project example' since it is for the Arduino, but I looked at it before.

    Thanks for the support.

Reply
  • Here is my setup code (.NET MF/C#):

    ` private const bool SpiChipSelectActiveState = true; // set signal to low when accessing chip private const int SpiChipSelectSetupTime = 0; private const int SpiChipSelectHoldTime = 0; private const bool SpiClockIdleState = false; // set signal to low when not accessing chip private const bool SpiClockEdge = true; // sample data on rising edge private const int SpiClockRateKHz = 2000;

        private InterruptPort _dataReadyPort;
        private const bool DataReadyGlitchFilter = false;
    
        private OutputPort _resetPort;
        private const bool ResetInitialState = false;
    
        private OutputPort _reqPort;
        private const bool ReqInitialState = false;
    
        _spiConfiguration = new SPI.Configuration(Cpu.Pin.GPIO_NONE, SpiChipSelectActiveState, SpiChipSelectSetupTime,
                SpiChipSelectHoldTime, SpiClockIdleState, SpiClockEdge, SpiClockRateKHz, spiModule);
    
            _resetPort = new OutputPort(resetPin, ResetInitialState);
            _reqPort = new OutputPort(reqPin, ReqInitialState);
    
            _dataReadyPort = new InterruptPort(dataReadyPin, DataReadyGlitchFilter, Port.ResistorMode.PullUp,
                Port.InterruptMode.InterruptEdgeHigh);
            _dataReadyPort.OnInterrupt += HandleDataReady;
    

    `

    After this code I set the _resetPort high and the HandleDataReady is called. In the HandleDataReady I create the SPI and start reading. Note that the chip select port is set to GPIO_NONE since the chip select is handled by the _reqPort. All other SpiChipSelect...-parameters should be read as don't care, I assume.

    I cannot use the 'transport layer verification project example' since it is for the Arduino, but I looked at it before.

    Thanks for the support.

Children
No Data
Related