Hi,
I am attempting to benchmark between using SSV1 and SSV2 to see which one is faster, I saw that the baud rate is higher for V2 and thought it may speed up my trace collection. The target is the Cw308 + STM32F303 target. I have been able to successfully communicate with SSV1, but have issues with SSV2.
Here, I am trying to write a key and read it back with SSV2:
struct key_str { ... };
key_str my_key = {0};
uint8_t set_key(uint8_t cmd, uint8_t scmd, uint8_t dlen, uint8_t *key)
{
memcpy(&my_key, key, sizeof(key_str));
simpleserial_put('r', 32, (uint8_t *)my_key.v);
return 0x00;
}
int main(void)
{
platform_init();
init_uart();
trigger_setup();
simpleserial_init();
simpleserial_addcmd(0x01, 32, set_key);
while (1)
simpleserial_get();
}
In python, I have the following script:
import chipwhisperer as cw
import numpy as np
scope = cw.scope()
target = cw.target(scope, cw.targets.SimpleSerial2)
scope.default_setup()
and see the following calls:
First, When I reset the target, the write test with simpleserial_write does not work:
However, if I repeat the cell, it works fine:
Second, if I use the send_cmd
and read_cmd
functions, it does not work at all and gives inconsistent reads.
Have I missed something or am doing something wrong? Why is it so inconsistent?