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;