EB091 USB

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
Brendan
Posts: 243
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 140 times
Been thanked: 118 times
Contact:

EB091 USB

Post by Brendan »

I'm liking this new EB091 board and choice of embedded dsPIC.

When selected as the target it all appears to be working so far - with the exception of the USB port of the target chip. Currently, when I initialise the USB through the USB Serial macro, not a blip in Windows Device Manager in response to target connect/disconnect.

Maybe I can tweak a few registers in a C-Block to configure the USB function? I'm well aware that most things USB can be a little... 'challenging', so all clues and suggestions welcome :)

Thanks all.

Brendan

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: EB091 USB

Post by Benj »

Hello Brendan,

I have had USB working on the EB091 and ECIO40P16 so I will investigate why it is no longer working.

Brendan
Posts: 243
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 140 times
Been thanked: 118 times
Contact:

Re: EB091 USB

Post by Brendan »

Thank you Ben,
Entirely appreciated :)

All the best,

Brendan

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: EB091 USB

Post by Benj »

Hello,

I can confirm that the ECIO40P16 works as expected but the EB091 currently does not. They are essentially the same chips running the same code so hopefully it shouldn't take long to track down the problem.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: EB091 USB

Post by Benj »

Hello,

I have tracked down the problem to a hardware fault. Basically the target dsPIC device should have it's VBUS pin connected to the USB 5V but instead it is simply connected to a 220uF capacitor. I have modified my board here and this has solved the problem and allowed the USB to fire up.

Here is a picture of my modification using insulated roadrunner wire. The right hand side of C23 is shorted to the right hand side pin on D12.
20150623_172731.jpg
20150623_172731.jpg (53.75 KiB) Viewed 9726 times
So you can either return the board to us and we will apply the fix or you can apply the fix yourself.

I will make sure that the up coming batch of EB091 boards are corrected so USB will work straight away.

There was also a minor Flowcode definition change to alter the USB prescaler and allow it to run at the right speed.
EB091.fcdx
(45.82 KiB) Downloaded 497 times
I will explore if there are any software workarounds we can use as I know for sure I have had USB working on an unmodified EB091 earlier on in development.

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 140 times
Contact:

Re: EB091 USB

Post by petesmart »

Hi Ben,

Any linkage to the issue that I'm having.. Is this worth a try?

Best

Pete
sorry about that Chief!

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: EB091 USB

Post by Benj »

Hi Pete,

As far as I can tell this only impacts the USB peripheral from firing up. In other PIC devices the VBUS is simply connected to a cap and left but on these new devices with OTG host support you have to connect the VUSB to the 5V for device mode or provide your own 5V supply for host mode.

I think your problems are related to something else, maybe the power diodes (D7, D12) are too low current and have burnt out over time. The two chips on the EB091 are both running at 70MIPs and so this requires a fair amount of current to run. The new voltage regulator is certainly more up to the job but the diodes have remained the same as they were on the EB006.

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 140 times
Contact:

Re: EB091 USB

Post by petesmart »

Thanks for the feedback Ben, I will run the meter over the diodes to check...
sorry about that Chief!

Brendan
Posts: 243
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 140 times
Been thanked: 118 times
Contact:

Re: EB091 USB

Post by Brendan »

Hi Ben
So you can either return the board to us and we will apply the fix or you can apply the fix yourself.

I will make sure that the up coming batch of EB091 boards are corrected so USB will work straight away.

There was also a minor Flowcode definition change to alter the USB prescaler and allow it to run at the right speed.

EB091.fcdx
(45.82 KiB) Downloaded 4 times
I've modified one of our boards and can confirm the proposed solution fully functional, complete with the new definition file :)
A very simple mod so we'll just mod the boards we have.


Thanks again,

Brendan

Post Reply