-
Still additional information regarding Fuses setting of SAMD21G18A
12/04/2016 at 13:14 • 0 commentsThe problem, programming USB port disappearing problem, is NOT hardware problem but software based problem. ( In other words, If you've made a program on Atmel Studio, you can pass through all problem.) When I see the setting of Arduino M0 (Arduino.org product), which is similar configuration with ULTRA Zero series has a fuse setting as,
We should see the value of "NVMCTRL_BOOTPROT = 0x01" which is apparently different from ULTRA (ULTIMA) setting of 0x07. But this value is suitable one for "Arduino M0" bootloader and if we switch bootloader from .cc version to .org version, "0x01" is suitable but just switching value from "0x07" to "0x01" will disable binary upload mode from USB interface (USB port appears but Arduino IDE (specifically gcc) unable to upload binary).
At this moment, the proper value seems to be "0x02", as follows:
This value can be accessed and modified through Atmel Studio as shown in my previous report. Please try the following procedure, if USB port does not appear at all.
(1) Re-burning Arduino bootloader by Arduino IDE by Atmel ICE
(2) Access fuse-bit of SAMD21G18A through Atmel ICE by Atmel Studio
(3) Check and set NVMCTRL_BOOTPROT = 0x02
-
Additional information regarding "wrong Fuses setting recovery"
11/24/2016 at 11:56 • 0 commentsSAMD21G18A has some unusual behaviour which sometimes change fuse setting by unknown timing. The "unusual state" seems to be triggered by some unusual program and as a result, programming port for Arduino IDE disappear. (In the case of Atmel Studio, connection is through JTAG and we don't have any problem.) Here I would like to explain how to recover "no USB" situation by using Atmel ICE.
(Step 1) connect your Atmel ICE to your computer connect JTAG to ULTRA Zero XX. series and launch Atmel Studio and select "device programming"
(Step 2) In the device programming window, Select device as "ATSAMD21G18A" and click Apply and set SWD 2MHz (default value).
After setting SWD clock, you can read "Device Signature" as "0x10010305". In this window, click "Fuses" on the left hand side will show you current fuse bit (NVRAM) setting.The first lots of lines shows "as a result" data, which shows MCU's calibration datas. These datas cannot be changed. The last around ten lines are editable datas.
I confirmed "it looks like completely broken board" change WDT_ENABLE and WDT_ALWAYSON are both checked. THESE SHOULD NOT BE ON and should be deselected as above picture.
These are "working board" setting. If your board has something different one, values should be modified and after that, push "Program" button to change setting. (NVMCTRL_BOOTPROT setting of 0x02 added on Dec. 4th.)It seems, this is a perfect solution for "unusual situation"....
-
USB port disappear problem and its solution
11/23/2016 at 11:24 • 1 commentI've sold more than 20 units of SAMD21G18A driven board, including ULTRA Zero, ULTRA Zero Color, and recently ULTIMA. I received a few experience of customer having "programming port recognition on OS disappear" problem. I've thought this is hardware problem (bad soldering or... related one) but it seems not hardware problem but "A phenomenon by Atmel SMART's nature", and could find the way for recovery.
I encountered this problem with this wrong programming source (please don't try to upload..
)
Yeah, internal loop function is something wrong. j=0; j<8; i++ is something wrong but it does not end just wrong program but "PROGRAMMING PORT DISAPPEARED" after uploading Arduino sketch containing this code.....!!!!
It seems, MCU becomes busy for executing wrong code and does not offer USB service and as a result no way for upload sketch again!
(REMEDY 1) Plug in USB cable to board (ULTRA Zero xx) and immediately double click reset button
This procedure prevent execute code in flash and the board will wait for new code upload.
So again Port will appear. (You may notice OLED is blank if you did some OLED related graphic program). Select newly recognised port and upload "correct (non-bug) program" through USB... Of course if same program (contains some bug or wrong point) is upload again, board will lost its connection to your computer again. Please don't do the same thing twice and re-write your program or cool-down your brain by uploading LED blink...
This procedure does not require any additional equipment. Just double click immediately after plug-in USB.
(REMEDY 2) BURNING NEW bootloader by Atmel ICE
Atmel ICE is a "must-have" item for Atmel MCU programming more deeper than Arduino environment. Just connect Atmel ICE and Ultra Zero XX board as
Please check the direction of JTAG on board. Just connect and
Select "Burn Bootloader". This is all what you will need to burn "new bootloader" to ULTRA Zero XX. After selecting and waiting around 10 secs, you will see
IF "shutdown command invoked" appears, the board is now starting with newly-burned bootloader and you will see the recognised USB port. Also in this case, "program with something wrong" uploading to board will reproduce the phenomena of "programming port lost". Please check and re-write program ..!
One optional thing to do is
change the value of "NVMCTRL_BOOTPROT" from 0x07 to 0x02. But the case is not related to this value and this modification is just optional (you don't need to do it).
Indeed, MCU board with on-board debugger such as Zero Pro by Arduino.cc can avoid this problem because in any case we can upload binary through debugger port. Also, I guess, this is why Arduino.cc release only board with debugger. (.org did release non-debugger board but )
-
Two sample applications for ULTRA Zero
11/21/2016 at 10:40 • 0 commentsI quickly made two sample applications for ULTRA Zero. The first one is analogue/digital voltage meter. The response is very fast and indeed beyond my expectation. The other one is "Game of Life" utilising 64x32 OLED dots. The voltage meter source is uploaded to
https://github.com/kodera2t/ULTIMA_SAMPLE/blob/master/ULtraZERO_analogmeter.ino
, and Game of Life source is uploaded to
https://github.com/kodera2t/ULTIMA_SAMPLE/blob/master/UltraZERO_GoL.ino
and you can buy ULTRA Zero at
https://www.tindie.com/products/microwavemont/ultra-zero-a-successor-of-sduino-zero/
Actual operation can be found in the following movie... Have fun!
-
Audio (wav file player) demo by ULTRA Zero
11/21/2016 at 01:10 • 0 commentsOne advantage of SAMD (ARM based processor) is built-in 10bit D/A converter. D/A converter driving is already well-prepared by precedent and here I quickly made a demo playing wav file stored in micro SD card in ULTRA Zero. Some primitive information are also presented on OLED display.
Actual operation can be found in the following movie.. and
Relevant source is uploaded to
https://github.com/kodera2t/ULTIMA_SAMPLE/blob/master/ULTRAZERO_player.ino
Have fun!
-
Pin arrangement problem for Arduino IDE programming...
11/10/2016 at 08:10 • 0 commentsI found errata between Arduino IDE's pin definition and on-board silk indication on ULTRA Zero.
The mis-arrangement are found between D0 to D4 and details is shown in the following image.
This difference can be aligned to "as written on board" if you have a chance to re-write firmware by Arduino.org's Arduino M0 (But it is not convenient since not main-stream so far..) Sorry inconvenient but please refer this image for your programming and prototyping.
Thank you,
-
SD card file listing sample program
10/29/2016 at 06:54 • 0 commentsULTRA series has both screen and micro SD card slot. Here I made a quick sample program presenting file list of inserted micro SD card on OLED display...!
Source code is uploaded to my github account Have fun!
-
ULTRA ZERO in production
09/03/2016 at 11:14 • 0 commentsThe first prototype had some circuit problem and now all of them are modified and fully tested. Here I would like to introduce "ULTRA ZERO" in final version!!
I made six unit for sale at my tindie store for $30. Compared to the initial version, I changed CS of microSD card as D10 and RESET of OLED card as D7.
This is very important thing for programming and I would like to write again
CS of micro SD: D10 RESET of OLED: D7
OLED is SSD1306 based and Adafruit library is working.Please visit my tindie store if you have interest! The sold item includes fully-assembled and fully function checked (OLED, microSD...) main board and pin-header for connection. Have fun!!