[SPI] problem with command phase
Posted: Wed May 02, 2018 4:23 pm
Hi,
I've been having quite a hard time figguring out why command phase in my SPI driver does not work. Eventually I discovered that it does not work with this code:
But works with this code (command length set after command value):
I also noticed that ESP-IDF uses this order (which does not work for me too):
So I am a bit confused. Anyone knows what is going on?
I've been having quite a hard time figguring out why command phase in my SPI driver does not work. Eventually I discovered that it does not work with this code:
Code: Select all
target_device->user2.usr_command_bitlen = 15;
target_device->user2.usr_command_value = 0xA1B2;
target_device->user.usr_command = 1;
// start user command
target_device->cmd.usr = 1;
Code: Select all
target_device->user2.usr_command_value = 0xA1B2;
target_device->user2.usr_command_bitlen = 15;
target_device->user.usr_command = 1;
// start user command
target_device->cmd.usr = 1;
Code: Select all
target_device->user2.usr_command_bitlen = 15;
target_device->user.usr_command = 1;
target_device->user2.usr_command_value = 0xA1B2;
// start user command
target_device->cmd.usr = 1;