CWNANO No signal in traces

I’ve been trying to run Lab2_1A in the sca101 course but I can’t seem to get any sort of signal in the power traces. I have the following code in simpleserial-base-lab2/simpleserial-base.c:

uint8_t get_pt(uint8_t *pt)
{
  trigger_high();
  trigger_low();
  return 0;
}

I capture a trace, change the code to:

uint8_t get_pt(uint8_t *pt)
{
  trigger_high();

  volatile long int A = 0x2baa;
  A *= 2;
  ... (20 times)

  trigger_low();
  return 0;
}

and capture another trace. I’ve verified that the assembly is actually different. Programming the STM gives no errors but I get no discernible features in either power trace or any difference between the two (the firmware with extra instructions is on the bottom):

I feel like there’s some initial set up that I must be missing but I can’t figure out what.

Hi,

Yeah, there’s definitely something strange going on here. Honestly, I’d call even the first trace odd, since serial responses are usually visible in the power trace. This just looks like the target is idling. This would make sense if it never enters the get_pt() function, but it clearly does since the trigger is going high.

I can actually replicate the issue on my setup as well, so hopefully I can get this fixed up for you pretty quick :slight_smile:

Alex

Well I found the issue on my end at least. Have you set PLATFORM=CWNANO, or is it still CWLITEARM?

Thanks for the reply. I’ve got SCOPETYPE=CWNANO and PLATFORM=CW308_STM32F3.

As for the serial response, 1) I’ve commented out the call to simpleserial_put in get_pt as the tutorial suggests and 2) shouldn’t trigger_low before that call make it not show up in the trace?

PLATFORM should be CWNANO as well.

Well that’ll do it. Thank you. Do these traces look good (is the bit at the beginning the extra code)?

Yup that looks good! Yeah, difference should only be at the beginning. You may want to try setting scope.adc.samples=400 or so and try recapturing (or just plot less of the data), since we’re not really running that many instructions and therefore don’t need to capture that much data.

Alex

Gotcha. Thanks again for your help!

1 Like