chipKIT uC32 with Dragino YUN shield

ltheoret
Posts: 50
Joined: Wed Dec 23, 2015 9:19 pm

Re: chipKIT uC32 with Dragino YUN shield

Post by ltheoret » Fri Feb 26, 2016 7:20 am

Also tested to see if I could reset the USB - UART interface like on the UNO. turns out that when you plug in the USB, the USB 5 Volt activates the USB - UART interface, when you unplug the USB cable the pin is pulled low to resets state. So in theory everything should work great without any modifications except for the reset jumper mentioned above.

Luc

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: chipKIT uC32 with Dragino YUN shield

Post by majenko » Fri Feb 26, 2016 10:56 am

Error setting parameter 70
Yep, that's exactly the error I have been seeing too.
I look forward to a chipKIT package. Would that include hardware or just software?
It would be pic32prog, programming scripts, and kernel modules for usbserial, ftdi_sio and cdc-acm - those will allow you to talk to all chipKIT boards through the USB interface.
Well I had a little time so I removed R1 and R2 from my uC32 board, and now there is 100% failure rate in programming. Great, just threw a board out the window
Oops. You didn't really want to do that. I can replace the resistors if you want to send me the board (UK), if you think it's worth it.
Is there a way to lower the baud rate for programming?
That would mean replacing the bootloader. Doable, but you need a programmer.
Also tested to see if I could reset the USB - UART interface like on the UNO. turns out that when you plug in the USB, the USB 5 Volt activates the USB - UART interface, when you unplug the USB cable the pin is pulled low to resets state. So in theory everything should work great without any modifications except for the reset jumper mentioned above.
Yeah, with no USB cable connected the FTDI chip gets no power. With no power it shouldn't interfere at all with the UART programming. With power it will mess it up completely. As I mentioned in the blog post - do not power it through USB or it will fail - power it through the barrel jack or some other means that doesn't involve the USB. On the WF32 I used the secondary USB interface - the one that goes to the PIC32's USB pins - and set the jumpers accordingly.

I'm going to experiment with modding the Dragino to bypass the UART level shifter today, see if that helps things. It would be good to just narrow it down to just what is causing the problem, even if it's not a straightforward fix.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: chipKIT uC32 with Dragino YUN shield

Post by majenko » Fri Feb 26, 2016 11:14 am

Will I had the brilliant idea of using 4.7 K ohm resistors to pull the RX and TX. well it reset OK but it made things worst. No Joy.
The level shifter really won't like that:
To avoid output contention issues, any pull-up or pull-down resistors used must be above 50 kΩ.
I have bypassed my level shifter and so far I haven't had a single issue with my uC32. It remains to be seen just how stable it is now though - time to try adding some more hardware and program things properly.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: chipKIT uC32 with Dragino YUN shield

Post by majenko » Fri Feb 26, 2016 11:30 am

Ok, I cannot get this to fail at all now. So it looks like that level shifter is in fact our culprit.

In fact, get this: With the level shifter bypassed you can program from the Dragino with the USB power connected!

So most problems seem to stem from that level shifter.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

ltheoret
Posts: 50
Joined: Wed Dec 23, 2015 9:19 pm

Re: chipKIT uC32 with Dragino YUN shield

Post by ltheoret » Fri Feb 26, 2016 4:38 pm

Hi,

So the level shifter converts from 5V to 3.3V for the Linux module, and we are operating at 3.3V.
Now I'm starting to understand.
OK I found U2 the NTB0102GT level shifter. Now does this thing convert to 5V or to 3.3 V?
It is too tiny for my skills. not touching that. but I am sure I could fine somebody here around tow that could make the changes you would suggest.
I would buy more board and have them converted at the same time.
All my board can operate at 3.3V

Luc

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: chipKIT uC32 with Dragino YUN shield

Post by majenko » Fri Feb 26, 2016 5:42 pm

Depending on the setting of the voltage jumper it either converts 3.3V (linux) to 5V (MCU) or from 3.3V (Linux) to 3.3V (MCU). In that latter setting it is redundant.

The way I bypassed it was to run two wires from the HE module to pins 0/1 of the header. That is far far easier than doing anything with the chip itself.

Pins 33 and 34 on the module are the UART:

Image
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

ltheoret
Posts: 50
Joined: Wed Dec 23, 2015 9:19 pm

Re: chipKIT uC32 with Dragino YUN shield

Post by ltheoret » Fri Feb 26, 2016 5:48 pm

Hi Majenko,

I can do that :) .
Is there anything thing that need to be done to the shift register? or just wire it and leave it?

Luc

ltheoret
Posts: 50
Joined: Wed Dec 23, 2015 9:19 pm

Re: chipKIT uC32 with Dragino YUN shield

Post by ltheoret » Fri Feb 26, 2016 5:58 pm

So UART_RX goes to TX and UART_TX goes to RX?
And I found a shop here in Edmonton that can do all sort of modifications for me. But I can tackle this one myself.

Luc

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: chipKIT uC32 with Dragino YUN shield

Post by majenko » Fri Feb 26, 2016 6:09 pm

On my shield the TX and RX have already been swapped on the silk screen. So TX goes to TX on the shield, which is RX on the chipKIT, and RX to RX which is TX on the chipKIT.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

ltheoret
Posts: 50
Joined: Wed Dec 23, 2015 9:19 pm

Re: chipKIT uC32 with Dragino YUN shield

Post by ltheoret » Fri Feb 26, 2016 6:15 pm

Hi,
Ah, you are write. Thanks again.

Luc

Post Reply