ATSAMC21 Xplained Pro board, can i run software without connecting the debugger? - Page 1
Forum section: electronics / general

author: JPortici
author_rank: Super Contributor
timestamp: February 16, 2017, 01:37:54 pm
content: 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?

author: ataradov
author_rank: Super Contributor
timestamp: February 16, 2017, 05:52:14 pm
content: 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

author: JPortici
author_rank: Super Contributor
timestamp: February 16, 2017, 06:06:31 pm
content: maybe they don't want you to use it standalone? could be.. debugger can't be used with chips with a different IDi'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

author: ataradov
author_rank: Super Contributor
timestamp: February 16, 2017, 06:17:29 pm
content: Quote from: JPortici on February 16, 2017, 06:06:31 pmI 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.Quote from: JPortici on February 16, 2017, 06:06:31 pmYou are welcome.

author: JPortici
author_rank: Super Contributor
timestamp: February 16, 2017, 07:49:40 pm
content: Quote from: ataradov on February 16, 2017, 06:17:29 pmno worries, this is for work. a segger j-link will be on its way for when the hardware is ready

author: jnz
author_rank: Frequent Contributor
timestamp: February 17, 2017, 05:29:46 pm
content: 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

author: JPortici
author_rank: Super Contributor
timestamp: February 18, 2017, 06:37:01 am
content: 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 buttonand 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 is1: enable 32k output0: disable 32k outputyou 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(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

author: zgrzys
author_rank: Newbie
timestamp: February 24, 2018, 07:32:07 pm
content: thank You a lot.I was going mad, when I tried to use SWD by atmel ice and couldn't even connect