[Solved] M3 Issues

Talk about our 40 Pin Dip ARM Cortex M3 / M0 Here

[Solved] M3 Issues

Postby Dave » Thu May 02, 2013 12:13 am

When I connect the M0 to a PC via USB it shows as a removable storage device.

When I connect the M3, in the same way, I get a message saying can not find the driver. So I browse to the location where I downloaded the driver, from your web site, and this seem okay. But the M3 will not show as a removable drive. Instead I can see it as a COM port in device manager.

Is this normal or what am I doing wrong?
Dave
 
Posts: 58
Joined: Fri Mar 29, 2013 12:48 am

Re: M3 Issues

Postby Dave » Thu May 02, 2013 10:18 am

Just to give you a few more details.

The M3 shows under COM ports as LPC13xx USB VCom Port (COM8).

The M0 shows under removable storage as CRP DIABLED.
Dave
 
Posts: 58
Joined: Fri Mar 29, 2013 12:48 am

Re: M3 Issues

Postby Carl-SolderSplash » Thu May 02, 2013 11:55 am

Hi Dave.

During testing, I flashed them with various firmware to prove they were functioning, I erased one but not the other.

When the LPC is blank it will enumerate as a mass storage device (Boot loader mode) letting you reflash it by deleting the firmware.bin and replacing it with your own.

To get the board that is enumerating as a COM port in to boot loader mode.

1. Plug in the USB
2. Hold the reset and boot buttons
3. Release Reset while holding boot
4. Wait a few seconds and release. You should have a mass storage device under attached

The drive name indicates the code protect state of the LPC, by default this is disabled.
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm

Re: M3 Issues

Postby Dave » Thu May 02, 2013 1:09 pm

Thanks Carl.

Before I delete the COM port firmware, what uses could this have?
Dave
 
Posts: 58
Joined: Fri Mar 29, 2013 12:48 am

Re: M3 Issues

Postby Carl-SolderSplash » Thu May 02, 2013 1:19 pm

I used it to check the USB enumeration.

As for actual practical use, if you have a board with TTL level RS232 serial coms on that you want to connect to the PC you can use this firmware.

It's on the project page if you want to re-instate it later.

As a note : I'm not sure you can erase the flash with the bootloader, only reprogram it. I used a jtag to erase the flash.

With the examples I'll provide later I intend to use the CDC to provide a command line console. Just got our kit back from the MakerFaire so I can get back to it this weekend.
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm

Re: M3 Issues

Postby Dave » Thu May 02, 2013 11:31 pm

I've been toying with the idea of buying your jtag board.

What are the benefits?

Does it make programming and firmware uploads much easier?
Dave
 
Posts: 58
Joined: Fri Mar 29, 2013 12:48 am

Re: M3 Issues

Postby Carl-SolderSplash » Thu May 02, 2013 11:55 pm

Our current Jtag (SplashTag), based on the XDS100 TI reference design, will only work in JTAG mode currently. The DipCortex's use SWD (Single Wire Debug) so requires a different type of Jtag.

The SplashTag's main benefit is that it allows you to use Code Composer for free, so it's good for debugging code written for the SplashBase. It also lets you debug DSP's, all other ARM M3's, ARM7's that support JTAG.

A Jtag/debugger's benefit is it lets you pause code, inspect variables, change them, view the call stack. If your serious about writing embedded code they are essential. Historically they were expensive and all use different interfaces. IDEs then only support a subset of these interfaces. Making it fun picking the right combination of Jtag, IDE and Micro.

ARM has recognised this and created the CMSIS-DAP standard, with the hope of making one open Jtag interface, that supports both JTAG and SWD modes, allowing every IDE to use it. So far I know Rowley, Coocox & Keil support it.

In the last few days NXP have announced LPC Link 2 with CMSIS-DAP firmware at a very low price, $20 I think. I don't think we could compete with it's low price to make it worth us making a CMSIS-DAP based JTAG.

But the SplashTag still has a use in the TI world and is competitive versus the other XDS clones I've seen.
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm

Re: M3 Issues

Postby Dave » Fri May 03, 2013 5:33 pm

It's getting a bit over my head Carl.

My programming skills are limited. I've done a little Python with the Raspberry Pi and a little programming with the Arduino. I've never tried to program an ARM proccessor before and not 100% sure what programming language you are using but suspect it's some form of C.

Could you reccmmend a good book to start learning to program ARM proccessors?

When I found you on Kickstarter it was the If 'Condition' Then 'Action' set of instructions that drew me to the SplahBase. I am prepared to learn a new programming language to get the most out of these products.
Dave
 
Posts: 58
Joined: Fri Mar 29, 2013 12:48 am

Re: M3 Issues

Postby Carl-SolderSplash » Fri May 03, 2013 10:32 pm

Yep plain C code, so will be the same syntax as the Arduino.

As for books, not sure really perhaps http://www.amazon.co.uk/Sams-Teach-Your ... s_403982_1

Teach yourself the basics of C using your PC and learn the syntax, variable types and pointers. It sounds as if you might already know a lot of this.

Once you are comfortable with that, transferring the knowledge to working with an ARM processor isn't too hard. The difference with running code on an ARM chip compared with a PC is the lack of an operating system. You have raw control over the peripherals, you do this by setting or clearing bits in registers. Registers are just values at certain memory addresses. IDE's and Chip manufactures try to make accessing these registers as easy as they can by giving you library's, like CMSIS, which give these special function registers names. Rather than a just long addresses.

Then there's interrupts, you can tell a peripheral (UART, ADC, GPIO etc...) that you want to be interrupted when something happens. The processor stops the code it was running and jumps to the code in your interrupt. When its finished executing the interrupt code it returns to where it left. For basic code/projects you can probably get by with out using them and just focus on a simple linear code.

You can start simple, toggling an LED say. for that you will need to learn about timing and using a processor pin as a general purpose input/output.
I've started a guide on that here : http://www.soldersplash.co.uk/products/ ... -lpc-gpio/

I'll help where I can
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm

Re: [Solved] M3 Issues

Postby Dave » Sat May 04, 2013 4:01 pm

Thanks Carl.

Book now ordered.
Dave
 
Posts: 58
Joined: Fri Mar 29, 2013 12:48 am


Return to DipCortex M3/M0

Who is online

Users browsing this forum: No registered users and 9 guests

cron