Having trouble with Lab2_1A Instruction differences

Hello!

I am having a lot of trouble with the instructions differences lab. I am designing a lessons for my school utilizing the CW lite. I have both a ARM and a XMEGA versions of the lite.

I have gotten the lab to work fine using the XMEGA, but I cannot get the correct results with the ARM. The chip does not idle like the XMEGA, so when it is done doing operations, it still voltage spikes consistently.

Am I the only one having these problems?

Thanks!
-Jack Little

Hi,

Yes, you should still see power spikes after the operation you’re interested in is done. If you’d like, you can reduce scope.adc.samples so that this part makes up less of the power traces.

Alex

Hi Alex!
Thank you for responding to my message!
I think I should have uploaded images with my initial question.

The first image is what I get running the first part of the lab on the XMEGA.
This second image is what I got running the first part of the lab with the ARM.

My school bought both devices as we are looking into using them for our classes. I initially made my lesson using the XMEGA target, but noticing the latter shift of focuse to ARM went back to update the lab for arm. When testing it again, I got these conflicting results.

I am no expert and could be doing somthing wrong. But looking at the differences, it almost looks like the Arm is running some form of loop when the XMEGA goes to idle. This part of the lab should see both devices go idle. I used the same source c code for both devices.

Now I am not the first one to mess around with these devices from my school, and there is a chance the one was broken, as I know some kids tried probing it with an oscilloscope.

I am hoping to learn If I am doing somthing wrong, or if if my arm device is faultily.

I do not think I am having problems building, uploading, or communicating with the target, as I am able to communicate with the ARM Micro in the connecting to hardware notebook.

Hope to hear from you again!

-Jack Little

Hi Jack,

Both devices are actually just in a loop here and are checking their USART peripheral to see if a new character has come in. There’s no low power state or anything going on, so I wouldn’t be too concerned with either power trace here.

Alex

Hello Again!
Once again thank you for the response.
I understand that neither microcontroller is really idling, as they are checking and waiting for serial messages. But this loop is not visible on the XMEGA Target, and its visibility on the ARM makes the results from the lab unreadable. The lab says that it is compatible with both targets, and that is why I think somthing must be wrong.

The following is the results from step 1.4 in the lab on both target.

I would really appreciate if someone could upload the results they get from this lab on their arm target so I can compare.

Thanks again!

-Jack Little

Hi Jack,

Here’s the function with nothing in it:

the function with multiplies:

and the function with the loop:

All three differ at the beginning, where the operations we’re interested in are happening.

Alex

Oh… so it really is just that hard to tell on the ARM target. That is a little disappointing, the much cleaner result on the XMEGA makes it way a way better readout for our undergraduate course. The ARM processor is just too fast :joy:.
I will look into modifying the lab code so that all the readouts are as readable as the last loop. I do not want to ask my school to buy the XMEGA knowing that they are being phased out.

Thank you for all the help! You have been very useful!

Have a wonderful weekend!

-Jack Little

Hi Jack,

Yeah, feel free to experiment here - that’s an important part of the lab :slight_smile:

You can try adding some more multiplies or try switching to divides, since those should both increase the difference between doing nothing and doing something.

Happy to help,

Alex