Show Posts
Pages: 1 [2] 3
16  Products / Arduino Due / Re: USB Host - Keyboard on: January 08, 2013, 09:38:43 pm
This problem was seen and spotted with a fix at,135399.0.html
The fix for keeping the power ON (for the native USB port) is  to
in loop(), immediately after the line usb.Task();  add the line
Thanks to stimmer who posted it.
It works as it is turning on native USB power all the time, and there is no fault handling.
It looks to me like it is a DueR3 issue and could be  be fixed in
However, this file appears to be pre-compiled to
17  Products / Arduino Due / Re: Debugging Arduino Due using SAM-ICE JTAG (an approach) on: January 07, 2013, 08:09:06 pm
FYI I have symbolics working with Atmel Studio 6.0.1996  (released Nov 2012)
So the  toolchain is DUEX powered externally with 9volts,  DUE JTAG connector (10pin 0.05")  -- cable ARM-JTAG-10-10 --(20pin 0.1") Atmel SAM-ICE JTAG emulator to USB port with Atmel Studio 6.0.1966 running on Win XP latest.
The SAM3X has something like 5 hardware breakpoints on chip, and as from AS6.0 Build 1996 supports symbolic decoding,  watching internal variables.
I used it on the USB Host code, Uhi_cdc.c: so haven't tested it on any .cpp yet.
The SAM-ICE JTAG is happier connected directly to a USB port. When it goes through a hub it would periodically get upset.
Even connected directly to a hub sometimes the segger JLINK.exe has an exception.
18  Products / Arduino Due / Re: ChibiOS/RT RTOS for Due on: January 05, 2013, 03:04:50 pm
For a discussion this is pretty good.
Seems like the AYEs are with ChibiOS
19  Products / Arduino Due / USB Host - Keyboard on: January 04, 2013, 11:16:10 pm
Hi, I'm having a few issues with turning on power to the Native USB port in Host mode/
I wonder if anybody has this working and if I'm missing something.?
I'm using the  V1.5.1r2 with the Keyboard Controller and referencing the Arduino_DUE_V02b schematic. My board is marked DUE R3
I'm powering the board from a 9V external source.
The voltage coming off F1 power the "Native USB" OTG Host - never turns on.

T1 FDN340P switches the+5V to USBVCC to F1. T1 Gate pin 3 must be pulled low to turn it on from IC1b "GATE_CMD" and effectively seems like it should be wiring ANDing  VIn >6.6V  and the processor UOTGVBOF being active low.
However looking at the schematic - its got some puzzling notes:
"Forces OFF the power supply to USB port when the USB port is in HOST mode (board powered from external power supply)"

I would have thought that the "Native USB" port in HOST mode supplies power to port, and it requires the DUE to be externally powered for this to happen.

What is currently happening, is if  Vin is below 6V6 then IC1B pin 5 is less  than pin6@3v3 which means that pin 7 goes low - switching on T1 .
So it seems to me that  IC1B pins 5 & 6 are the wrong way around. That is when Vin is above 6V6, there is +5V power available to supply the USB Host powering ?
OR am I missing something?

So a simple fix for this rev3 is to set VBUSP0 "0" - its default mode to make  UOTGVBOF high for turning on power to USBVCC.
 It seems like the code is in  uotghs_host.c/h: UHD_init()
// Signal is active low (because all SAM3X Pins are high after startup)
// Hence VBOF must be low after connection request to power up the remote device

and .h
//! Set USB_VBOF output pin polarity
#define uhd_set_vbof_active_high()            (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSPO))
#define uhd_set_vbof_active_low()             (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSPO))

Anybody got this working?

20  Development / Other Software Development / Re: SCoop - multitask and Simple COOPerative scheduler AVR & ARM on: December 23, 2012, 01:09:41 pm
Hey good to see the SCoop - I haven't been able to try it out yet - but fantastic to see something published.
I've put a simple multi-loop tasker together myself - based on the way of doing it. However I haven't had time to be able to test it out or publish.
I look forward to checking out SCoop.
IMHO the value of a co-operative scheduler, is to have a simple move into multi-tasking.
It seems to me the value of pre-emptive schedulers is to be able to do system level heavy lifting - especially for buffered IO process tcp/ip interrupts, and to be able to meet other hard deadlines.  The cost of the pre-emptive scheduler, IMHO, is high in terms of system complexity and maintaining stability.
In a previous life with a 100 realtime software engineers, the Software VP owned the pre-emptive schedulers priorities to stop just anyone optomizing it for their functional systems.  In fact most of the processes ran at the same priority, and just the few processes that were managing the hardware redundancy and I/O had higher priorities.

My experience in software has been to simplify the design and use as simple as possible primitives to implement it. For this type of design event based designing is extremely valuable .  That is encouraging a discussion of what events are coming into the board and what are the outputs.  So having the ability to collect user input in a buffer via an interrupt and then process/schedule a task::loop to parse the input on a terminating  <CR> or '?' is very simple. Very simple primitives - user input collection - and the ability to schedule a task::loop. Also supports the architecture for low power processing.
Wishing everyone a nice seasonal holiday - Cheers Neil
21  Using Arduino / General Electronics / Re: Type of 10-pin JTAG header of Arduino Due on: December 16, 2012, 11:55:45 pm
I found a low cost source of 20pin to 10pin 0.05" JTAG connectors.
Olimex ARM-JTAG-20-10 = US$7.00  -
from and it has worked for me with the Atmel SAM-ICE
The JTAG 2x5 0.05" connector does hit another connector SIL 0.1" called Debug - but it can be pressed in and does work for me.
The JTAG isn't keyed and I have the cable direction as coming away from the board.
22  Products / Arduino Due / Re: Programm error: assertion "(address & 0x80) == 0" failed on: December 11, 2012, 10:03:32 pm
The Due/SAM3X takes the TWI address in 7 bit format with out the lower b0 R/W.  ie range 0-127. and that is used to write the hardware address register.
A lot of TWI address are quoted in 8bit format with the lower R/W bit added and then it is written it to the hardware address register.
This particular syntax got me stymied for a few days  when an NXP data sheet was quoting the address in 8 bit "hex" format and Ididn't realize it.
23  Products / Arduino Due / Re: Why use a RTOS? on: December 11, 2012, 09:47:42 pm
That would be fantastic. Neil
24  Products / Arduino Due / Re: Python for Arduino Due on: December 07, 2012, 09:58:29 pm
As I understand it the benefit of pyhton is the ability to process text strings.
So for interfacing over USB to an instrument or external module there would be an easier capability to manage the input and output.
However, I don't think it replaces C++. The C++ is the machine control environment and implement the drivers and management.
So the down side is more resources - ram and flash.
25  Products / Arduino Due / Re: Debugging Arduino Due using SAM-ICE JTAG (an approach) on: December 06, 2012, 02:10:08 pm
Hi All, I'm using the SAM-JTAG and Atmel Framework examples on a pvt SAM3X hw and also SAM3X-EK - I'm hoping to get a production Due when they  arrive later this month at Digikey, Sparkfun etc.
I've brought in the Arduino DUE  C++ framework to Atmel Studio 6, however when downloading through the JTAG I haven't bee able to put watches in the internal RAM.
I can get access to the peripheral memory map with the C drivers it seems - which is really nice

Anybody got the symbolics working and accessible with Atmels Studio C++ compiler?
26  Products / Arduino Due / Re: Arduino Due compatible with Arduino Ethernet shield or Arduino Wifi shield ? on: December 06, 2012, 01:27:52 am
I have the Ethernet Shield (rev3) with the Beta Due running a COSM reporting sketch 24/7 for the past 3months with no problems.
27  Products / Arduino Due / Re: Debugging Arduino Due using SAM-ICE JTAG (an approach) on: December 06, 2012, 01:13:18 am
Does this do the same thing
I haven't checked out the wiring - but there is an ARM spec for a 0.05" connector.
28  Products / Arduino Due / Re: Porting libs from the Atmel Framework on: December 05, 2012, 07:56:19 pm
Hey Nice to see it
I was thinking of pulling the RTC in from the from the framework.
Code comment review.
There is a potential hiccup. When reading hardware registers and operating on them I always make one good local read/copy of the hardware register and then operate on the same value.  So in
int RTC_clock::get_hours()
return (((current_time()  & 0x00300000) >> 20) * 10 + ((current_time()  & 0x000F0000) >> 16));
converting from BCD to std number the "current_time()" is called twice and each time reads from the hardware registers. With the two  current_time() reads they could return different readings.
Better I would think to do
int RTC_clock::get_hours()
uint32_t dwTimeCurrent = current_time();
return (((dwTimeCurrent  & 0x00300000) >> 20) * 10 + (( dwTimeCurrent & 0x000F0000) >> 16));
29  Products / Arduino Due / Re: DUE temperature sensor API on: October 25, 2012, 01:15:50 pm
I put in a request to enable the ADC15/temperature sensor. However - it is the temperature on the die - which does warm up.
To make it be close to the ambient temperature is going to require implementing a power down mode - no power no die warmup - and then on wakeup reading the temperature straight away.
30  Products / Arduino Due / Re: Ethernet Capability on: October 22, 2012, 08:11:28 pm
I've been using the standard Ethernet Board with the Beta release and pushing data on some watermeters I'm recording to COSM. Worked nicely and reliably.
Looking at the hardware, PB0-PB9 - the ehternet pins - are run to a connector with 14pins - labeled on the schematic MACB - but can't visually see anything on the board that specifies MAC. The MACB has no gnd or power shown - so looks like expected to be used with other pins. Neil
Pages: 1 [2] 3