Author Topic: ATSAMC21 Xplained Pro board, can i run software without connecting the debugger?  (Read 562 times)

0 Members and 1 Guest are viewing this topic.

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 1674
  • Country: it
I have started developing code on an ATSAM C21 using the Xplained demo board.
I'd like now to run the application without having the board connected to a pc.
I have programmed the MCU with the software in release mode, i apply 5V from the power connector but the target MCU doesn't receive power. Infact, power to the target MCU is blocked by a FET activated with the TARGET_MCU_VOLTAGE signal and that comes from the onboard debugger.
what do i have to do?
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 3163
  • Country: us
  • I informed you thusly
    • Personal site
Had this problem too. In theory, it should work, but in practice it does not. It may be a bug or something.

I simply bypassed the transistor :)
Alex
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 1674
  • Country: it
maybe they don't want you to use it standalone? could be.. debugger can't be used with chips with a different ID
i'll wait and see what they tell me from atmel community.

while you're here can i thank you for your SAM library? i'm not actually using it but it helped me understanding the namings and conventions better than ASF and gave me a good kick start :)
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 3163
  • Country: us
  • I informed you thusly
    • Personal site
maybe they don't want you to use it standalone? could be.. debugger can't be used with chips with a different ID
I doubt it. It is just an oversight or a bug.

Debugger can be used standalone, just tell studio to not pay attention to what debugger says about the supported chips. But it is a huge hassle, so I doubt anyone will want to do this, given that actual debuggers have similar price.

while you're here can i thank you for your SAM library? i'm not actually using it but it helped me understanding the namings and conventions better than ASF and gave me a good kick start :)
You are welcome.
Alex
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 1674
  • Country: it
maybe they don't want you to use it standalone? could be.. debugger can't be used with chips with a different ID
I doubt it. It is just an oversight or a bug.

Debugger can be used standalone, just tell studio to not pay attention to what debugger says about the supported chips. But it is a huge hassle, so I doubt anyone will want to do this, given that actual debuggers have similar price.


no worries, this is for work. a segger j-link will be on its way for when the hardware is ready
 

Offline jnz

  • Frequent Contributor
  • **
  • Posts: 331
JPortici, I have a project coming up I was interested in the C21 for. Well, that was before I learned on it's FD issues, but I could still use it. I'll be interested to see if you post a lot of issues with it ;)
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 1674
  • Country: it
oh but i didn't get it for can-fd, just for the double can controller in small package. I don't think i'll be using it for other projects after this one (nxp is more interesting for what i can't do with a dspic)

as far as you know, are there even cars around which uses can fd? maybe some farming equipment, but cars/trucks?

Anyway, for now didn't find no issue. i did find some (obvious) things not mentioned or not so clear in the datasheet, for example regarding the clocks/pll but it's rather obvious once you see inside the functions of any example project.

one thing i hate when reading the datasheet is when they don't mention what the hell a bit does: when i was setting up the pll to get 48 MHz from the 32k oscillator (yeah, yeah but you must do it: because hardware bug the mcu doesn't work reliably if you configure the internal FRC at > 4 MHz and the internal FRC can't be used for the PLL and the xosc pins are shared with user LED and button  :-// and in other mcus like the NXP 54xxx dual core mcus you don't even have the XOSC input, only 32k but at least a pll optimized to work with it)
so, the pll wasn't working until i decided to switch the bit "enable 32k output"
the description for the bit is
1: enable 32k output
0: disable 32k output

you don't say=  ::)

i though it would go to the refclock output or something like in PICs, but that's the actual output of the module! clock is unavailable until you enable the output. obvious, but mentioning it somewhere would have been nice.
In the end the clock is a bit jittery, consistent with the crystal jitter, but the accuracy was 48 meg spot on! and my car isn't complaining so....

Interesting note: when i was first configuring the clock i made a typo and set the output at 102 MHz instead of 40  :palm: (0xC43 instead of 0x4C3 on the divider) on a pin configured as the refclock output was still good, though a sinewave and the simple toggle a led firmware was still working
« Last Edit: February 18, 2017, 05:50:23 PM by JPortici »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

http://opalkelly.com/