Author Topic: SPI a trap 4 young players  (Read 1405 times)

0 Members and 1 Guest are viewing this topic.

Offline LuciferTopic starter

  • Newbie
  • Posts: 2
  • Country: dk
SPI a trap 4 young players
« on: January 10, 2018, 08:22:27 pm »
I´m trying to manipulate some registers in a nrf24l01+, using a bus pirate, I had managed to read the registers using this symtax in the bus pirate terminal

SPI>[0x06 r]
/CS ENABLED
WRITE: 0x06
READ: 0x0F
/CS DISABLED

The value 0x0F is equal to the datasheet, i had tried to manipulate the value, but however what i tries it stays the same, any clue to what I´m doing wrong, in this scenario I dont care what the value wil become, I just wont to see that I can manipulate the value

Lucifer
 

Offline ShowKemp

  • Contributor
  • Posts: 16
  • Country: ls
Re: SPI a trap 4 young players
« Reply #1 on: January 10, 2018, 08:38:23 pm »
The first byte the nRF24L01+ send to the SPI master (in this case the bus pirate) is the STATUS register, so most likely that 0x0F byte you are getting is the STATUS register.

To write to a nRF24L01+ register you need to send 0b001A AAAA, where A AAAA is the register address and then the value you want to write into the register.

Check the nRF24L01+ datasheet on page 51.
 

Offline LuciferTopic starter

  • Newbie
  • Posts: 2
  • Country: dk
Re: SPI a trap 4 young players
« Reply #2 on: January 10, 2018, 09:09:20 pm »
As I wrote an anserw to complain that i not got it, i actualy got it :-)

I may use the value 2 to write
and the the register ect 0x06

add this to gether gives 0x26

So the syntax i finaly manage to work is

[0x26 0b00000100 r]

It returned a register value of 4, finaly i can move on, Thx so mutch, to point me in the right direction :-)

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf