ULINK 10 X 0 ME
2004-05-24 by Rodrigo
I'm almost 1 month with a ULINK, and I couldn't debug my code yet... The two Blinky examples debug. I'm using the Startup.s and Flash.ld files from Blinky IRQ, cause I use timer 0 interrupt.I can load the my code and run, but when I try to debug I receive the MEMORY MISMATCH error. I know that the MCB2100 settings are correct, cause the Blinky examples debug...Do I need to change the Startup.s or Flash.ld files in order to debug my code? I really don't know what's wrong with my code... > -----Mensagem original----- > De: lpc2000@yahoogroups.com [mailto:lpc2000@yahoogroups.com] > Enviada em: segunda-feira, 24 de maio de 2004 15:11 > Para: lpc2000@yahoogroups.com > Assunto: [lpc2000] Digest Number 193 > > ------------------------ Yahoo! Groups Sponsor > > There are 16 messages in this issue. > > Topics in this digest: > > 1. New file uploaded to lpc2000 > From: lpc2000 > 2. Re: SOT313-2 / LQFP48 footprint > From: "Chetan Bhargava" <list1@...> > 3. RE: USB 2.0 with NET2270 / NET2272 and LPC2000 ? > From: "Curt Powell" <curt.powell@...> > 4. Mail Delivery System > From: mcarioti@... > 5. Re: USB 2.0 with NET2270 / NET2272 and LPC2000 ? > From: "Shannon Holland" <holland@...> > 6. Re: Flash fails to write a bit or zeroes other bit > From: "chazeltopman" <rob@...> > 7. v1.2 CrossWorks for ARM released > From: "Michael Johnson" <mpj@...> > 8. Re: Flash fails to write a bit or zeroes other bit > From: "chazeltopman" <rob@...> > 9. LPC 2212/14 Development Board > From: "Srinath" <srinath.ananthaswamy@...> > 10. Sample ISR setup code for GCC?(Newbie) > From: "Richard" <embeddedc@...> > 11. Re: Sample ISR setup code for GCC?(Newbie) > From: "Karl Olsen" <kro@...> > 12. Re: LPC 2212/14 Development Board > From: Robert Adsett <subscriptions@...> > 13. Re: LPC 2212/14 Development Board > From: Robert Adsett <subscriptions@...> > 14. interrupt vector table & IAP > From: "more_effective" <wolfish@...> > 15. SWI Software Interrupt > From: "Rob R" <rob@...> > 16. Re: interrupt vector table & IAP > From: MaxStream - Ryan Bedwell <ryanb@...> > > > ________________________________________________________________________ > ________________________________________________________________________ > > Message: 1 > Date: 23 May 2004 22:33:31 -0000 > From: lpc2000 > Subject: New file uploaded to lpc2000 > > > Hello, > > This email message is a notification to let you know that > a file has been uploaded to the Files area of the lpc2000 > group. > > File : /LPC2100-protel-sch-footprint.zip > Uploaded by : cbhargava <list1@...> > Description : Protel 99SE device (sch) and footprint (PCB) > > You can access this file at the URL > > http://groups.yahoo.com/group/lpc2000/files/LPC2100-protel-sch- > footprint.zip > > To learn more about file sharing for your group, please visit > > http://help.yahoo.com/help/us/groups/files > > Regards, > > cbhargava <list1@...> > > > > > > > ________________________________________________________________________ > ________________________________________________________________________ > > Message: 2 > Date: Sun, 23 May 2004 22:45:59 -0000 > From: "Chetan Bhargava" <list1@...> > Subject: Re: SOT313-2 / LQFP48 footprint > > Thanks Leon, > > I have created a device for schematic and LQFP48 pcb footprint. I > have uploaded a zip file containing the library. > > -Chetan Bhargava > > > > > ________________________________________________________________________ > ________________________________________________________________________ > > Message: 3 > Date: Sun, 23 May 2004 21:07:08 -0700 > From: "Curt Powell" <curt.powell@...> > Subject: RE: USB 2.0 with NET2270 / NET2272 and LPC2000 ? > > Martin, > > I've worked with the Cypress family of chips- EZ-USB, FX, FX2, and SX2 > (stay away from the SX2). Don't have any experience with NetChip. > Charles Manning on this list has worked with the ftdi chip. With any of > these chips you'll probably be limited by the lpc gpio speed, assuming > you're using gpio to interface with the USB chip, to a few megabytes per > second bulk throughput. > > I recall seeing announcements of other ARM-based chips with on-board USB > and in the last week or so there was a rumour posted about a future > "LPC2130" with on-board USB. > > Curt > > -----Original Message----- > From: capiman@... [mailto:capiman@...] > Sent: Sunday, May 23, 2004 2:19 AM > To: lpc2000@yahoogroups.com > Subject: [lpc2000] USB 2.0 with NET2270 / NET2272 and LPC2000 ? > > > Hello, > > has someone used one of NetChip's USB 2.0 controller with LPC2000 series > (or > any other uC) ? > Is it working without problems ? What bandwidth can i reach in reality ? > What is the rough price of these chips ? > > Regards, > > Martin > > > > > > Yahoo! Groups Links > > > > > > > > > ________________________________________________________________________ > ________________________________________________________________________ > > Message: 4 > Date: Mon, 24 May 2004 12:29:02 +0800 > From: mcarioti@... > Subject: Mail Delivery System > > The message contains Unicode characters and has been sent as a binary > attachment. > > > > [This message contained attachments] > > > > ________________________________________________________________________ > ________________________________________________________________________ > > Message: 5 > Date: Sun, 23 May 2004 21:30:59 -0700 > From: "Shannon Holland" <holland@...> > Subject: Re: USB 2.0 with NET2270 / NET2272 and LPC2000 ? > > There's also the TI TUSB3410 (think that's the right part number) which is > 8052 based and communicates with external chips over a UART/GPIO. So no > need > to bitbang a memory bus. Program execution is out of RAM (can either be > loaded from the host driver or else a I2C rom). > > Haven't used it yet, but am planning to try it with the 210x in the next > week or so. > > Shannon > > On Sun, 23 May 2004 21:07:08 -0700 > "Curt Powell" <curt.powell@...> wrote: > >Martin, > > > >I've worked with the Cypress family of chips- EZ-USB, FX, FX2, and SX2 > >(stay away from the SX2). Don't have any experience with NetChip. > >Charles Manning on this list has worked with the ftdi chip. With any of > >these chips you'll probably be limited by the lpc gpio speed, assuming > >you're using gpio to interface with the USB chip, to a few megabytes per > >second bulk throughput. > > > >I recall seeing announcements of other ARM-based chips with on-board USB > >and in the last week or so there was a rumour posted about a future > >"LPC2130" with on-board USB. > > > >Curt > > > >-----Original Message----- > >From: capiman@... [mailto:capiman@...] > >Sent: Sunday, May 23, 2004 2:19 AM > >To: lpc2000@yahoogroups.com > >Subject: [lpc2000] USB 2.0 with NET2270 / NET2272 and LPC2000 ? > > > > > >Hello, > > > >has someone used one of NetChip's USB 2.0 controller with LPC2000 series > >(or > >any other uC) ? > >Is it working without problems ? What bandwidth can i reach in reality ? > >What is the rough price of these chips ? > > > >Regards, > > > > Martin > > > > > > > > > > > >Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > > > >Yahoo! Groups Links > > > > > > > > > > > > > > ________________________________________________________________________ > ________________________________________________________________________ > > Message: 6 > Date: Mon, 24 May 2004 05:40:08 -0000 > From: "chazeltopman" <rob@...> > Subject: Re: Flash fails to write a bit or zeroes other bit > > --- In lpc2000@yahoogroups.com, "chazeltopman" <rob@n...> wrote: > > Now let me explain the write algorithm I'm using. > > I need to be able to store 32 bit values into flash > > one at a time. Since the IAP routines limit writes > > to a minimum of 512 bytes I had to work around > > this limit. > > I've received an anonymous reply that addresses the > flash writing limitations: > > : The flash can not be used '32 bit word' wise. > : You could try to write 16 bytes at once (4x 32 bit word), > : but the number of partial writes per 512 bytes (the normal > : size) is limited (I don't believe this number is specified). > : > : Note the '16 byte'data should be properly aligned on 16 byte > : multiples (but again the number of 'partial write'is limited > : .. let's say .. 16 times or so :-) ). > : > : You may repost this info in the group - as long as you > : don't refer to me. > > Since counting the number of times I write to a location > presents a new bag of trouble, I'll use the dumb algorithm > of copy, modify, erase and write back. Sigh. > > Rob > > > > ________________________________________________________________________ > ________________________________________________________________________ > > Message: 7 > Date: Mon, 24 May 2004 08:36:03 +0100 > From: "Michael Johnson" <mpj@...> > Subject: v1.2 CrossWorks for ARM released > > We've released v1.2 of CrossWorks for ARM - this is available for both > windows and linux. > > >From an LPC21xx perspective the following applies > > - memory map files are shipped that describe the registers/memory of > all the LPC21xx devices. > - a processor property to select the memory map by processor name. > - support for Segger J-Link (windows only) - as shipped with the > Philips/IAR kickstart kit. > - samples now work on Olimex LPC-P1, Keil MCB2100, Philips/IAR > kickstart and Nohau LPC210x dev boards. > - reset script changes to make flash loading more reliable. > - target property to set the clock speed of the flash loader. > - support for the gcc 3.3.4 assembly coded arm FP routines. > > Thanks > Michael > > > > > ________________________________________________________________________ > ________________________________________________________________________ > > Message: 8 > Date: Mon, 24 May 2004 08:35:03 -0000 > From: "chazeltopman" <rob@...> > Subject: Re: Flash fails to write a bit or zeroes other bit > > > --- In lpc2000@yahoogroups.com, "chazeltopman" <rob@n...> wrote: > > Now let me explain the write algorithm I'm using. > > I need to be able to store 32 bit values into flash > > one at a time. Since the IAP routines limit writes > > to a minimum of 512 bytes I had to work around > > this limit. > > I've received an anonymous reply that addresses the > flash writing limitations: > > : The flash can not be used '32 bit word' wise. > : You could try to write 16 bytes at once (4x 32 bit word), > : but the number of partial writes per 512 bytes (the normal > : size) is limited (I don't believe this number is specified). > : > : Note the '16 byte'data should be properly aligned on 16 byte > : multiples (but again the number of 'partial write'is limited > : .. let's say .. 16 times or so :-) ). > : > : You may repost this info in the group - as long as you > : don't refer to me. > > Since counting the number of times I write to a location > presents a new bag of trouble, I'll use the dumb algorithm > of copy, modify, erase and write back. Sigh. > > Although, with a second thought, it might be worth a best-of > algorithm which does a: > o copy > o modify > o write > o compare > o if ok then done > o if different then do dumb algorithm > > The question is, how much should be compared? If I compare > just the surrounding 512 byte section that I am writing to, > will the other sections in the 8K sector be affected? I > suspect not. But if the write fails, then the copied part > and the other sections from the flash must be merged to form > the new flash sector image. > > Now what if I didn't have to write 512 bytes? > Does the reply suggest that I can use the IAP write command > with a value smaller than the stated 512 bytes? Hmmm... One > way to find out is the emperical method.... No. Only the > published values are accepted. So I tried to write the > whole section of 512 bytes multiple times and the most I > got was three good writes after an erase but mostly just > two. So overall, I could cut the time in half by only > erasing every second write or as above, if they differ. > In my testing, I stayed with a 16 byte, aligned, segment. > > This is my testing with MaxForth V5.2 in interactive > hex entry mode: > Where: FLERASE will erase an 8K sector containing a given address > Z compares SECTOR to flash and prints the differences > SECTOR is a 512 byte buffer > COM and READY are command/response buffers > IAP takes a command buffer and returns it as a result buffer > > 3DC00 FLERASE OK ( erase 8K sector ) > Z 3DC00 3DC04 3DC10 3DC14 3DC18 OK ( buffer has differences ) > A55B SECTOR 10 + ! OK ( alter some buffer locations ) > FFFFFFFF SECTOR 14 + ! OK > Z 3DC00 3DC04 3DC10 3DC18 OK ( less differences ) > 32 READY ! READY IAP ? 33 COM ! COM IAP ? Z 0 0 OK ( first write is ok ) > A558 SECTOR 10 + ! Z 3DC10 OK ( change buffer again ) > 32 READY ! READY IAP ? 33 COM ! COM IAP ? Z 0 0 OK ( second write is ok > ) > FDP @ SECTOR 14 + ! Z 3DC14 OK ( change buffer again ) > 32 READY ! READY IAP ? 33 COM ! COM IAP ? Z 0 0 3DC18 OK ( third write > fails ) > > The third write failed at a location that I wasn't even > changing (0x 3DC18). > > I like the flash on the 6812 where they have two separate flash > banks with different write widths. The smaller one has a write > width of 4 bytes so if you need to write 32 bit values in flash > you use the smaller flash. If you can write in large blocks, > you use the larger flash. > > Rob > > > > ________________________________________________________________________ > ________________________________________________________________________ > > Message: 9 > Date: Mon, 24 May 2004 09:10:23 -0000 > From: "Srinath" <srinath.ananthaswamy@...> > Subject: LPC 2212/14 Development Board > > Hi all, > I would like to obtain a cheap setup to experiment using the LPC > 2212/14. Could someone please help me with the following beginner > queries. > > > 1. Where are the development boards for the 2212/14 available > a. If so how much would they cost. > > 2. I am planning on using the GNU toolchain (GCC, GDB) for the > development/debugging. > a. Does a tool like the LPC2000 ISP programmer for the device > exist for a Linux platform > b. If I use JTAG to program/debug on the board where do I > obtain a JTAG adapter and what is the setup for programming/debugging > using that in Linux. > > > NOTE: I have chosen the LPC 2212/14 over LPC2106 for the sole reason > that it has an external bus and I can interface devices like an > external ADC or USB device etc to the microcontroller. I hope my > understanding is correct. > > Thanks in Advance > > Regards > > Srinath A > > > > ________________________________________________________________________ > ________________________________________________________________________ > > Message: 10 > Date: Mon, 24 May 2004 10:08:57 -0000 > From: "Richard" <embeddedc@...> > Subject: Sample ISR setup code for GCC?(Newbie) > > Hi, > > I have used the GNU tools on an AVR, but not before on an ARM. Does > anybody have a link to some sample code that setups up an ISR, > preferable on a timer? There does not seem to be a file posted. > > I have read the __attribute__((interrupt(IRQ))) part of the GCC > manual, but this doesn't explain how the IRQ is installed as such. > > Thanks... > > > > ________________________________________________________________________ > ________________________________________________________________________ > > Message: 11 > Date: Mon, 24 May 2004 13:17:53 -0000 > From: "Karl Olsen" <kro@...> > Subject: Re: Sample ISR setup code for GCC?(Newbie) > > --- In lpc2000@yahoogroups.com, "Richard" <embeddedc@h...> wrote: > > > I have used the GNU tools on an AVR, but not before on an ARM. > Does > > anybody have a link to some sample code that setups up an ISR, > > preferable on a timer? There does not seem to be a file posted. > > > > I have read the __attribute__((interrupt(IRQ))) part of the GCC > > manual, but this doesn't explain how the IRQ is installed as such. > > Check out the "Philips LPC2100 Blinky IRQ Example" that you can > download from the File Download Area at http://www.keil.com. > > Karl > > > > > ________________________________________________________________________ > ________________________________________________________________________ > > Message: 12 > Date: Mon, 24 May 2004 09:45:22 -0400 > From: Robert Adsett <subscriptions@...> > Subject: Re: LPC 2212/14 Development Board > > At 09:10 AM 5/24/04 +0000, you wrote: > > a. Does a tool like the LPC2000 ISP programmer for the device > >exist for a Linux platform > > See http://www.engelschall.com/~martin/lpc21xx/isp/index.html > > Robert > > " 'Freedom' has no meaning of itself. There are always restrictions, > be they legal, genetic, or physical. If you don't believe me, try to > chew a radio signal. " > > Kelvin Throop, III > > > > ________________________________________________________________________ > ________________________________________________________________________ > > Message: 13 > Date: Mon, 24 May 2004 09:42:33 -0400 > From: Robert Adsett <subscriptions@...> > Subject: Re: LPC 2212/14 Development Board > > At 09:10 AM 5/24/04 +0000, you wrote: > > NOTE: I have chosen the LPC 2212/14 over LPC2106 for the sole reason > >that it has an external bus and I can interface devices like an > >external ADC or USB device etc to the microcontroller. I hope my > >understanding is correct. > > There are certainly USB, A/D and D/A peripherals that do not require a > parallel address and data bus. Unless you are planning on using a > specific > peripheral that needs the external bus the only other driving force would > be if you needed more memory than is provided on chip on the non-external > bus chips. > > Robert > > " 'Freedom' has no meaning of itself. There are always restrictions, > be they legal, genetic, or physical. If you don't believe me, try to > chew a radio signal. " > > Kelvin Throop, III > > > > ________________________________________________________________________ > ________________________________________________________________________ > > Message: 14 > Date: Mon, 24 May 2004 15:52:16 -0000 > From: "more_effective" <wolfish@...> > Subject: interrupt vector table & IAP > > Hi everybody, > We are trying to work with LPC2104 & Keil uVision3. > > If you take LPC2104 user's manual (2 oct 2003) you can read: > "If user's code is runing from the on-chip RAM and an aplication > uses > interrupts, interrupt vectors must be re-mapped to flash > address 0x0." (from page 70, VIC usage notes) > > BUT, you can also read: > "The user should either disable interrupts, or ensure that user > interrupt vectors are active in RAM and that the interrupt handlers > reside in RAM, before making a flash erase/write IAP call." (from > page 180, Interrupts during IAP) > > What we don't understand is the expression "ensure that user > interrupt vectors are active in RAM". Active in RAM? We thought all > interrupts & exceptions must be active in 0x0 and above (i.e., flash). > > BTW, can we manage to hace two APPs in flash with diferent interrupt > vector tables? > > Thanks a lot in advance. > > -.-WOLFISH-.- > > > > > ________________________________________________________________________ > ________________________________________________________________________ > > Message: 15 > Date: Mon, 24 May 2004 18:27:23 +0100 > From: "Rob R" <rob@...> > Subject: SWI Software Interrupt > > Hi, > > I'm using Keil & GNU to compile an example program that does simple GPIO > manipulation and sends some data through the UART, but for some reason, > there is a software interrupt (SWI_Handler??) for no apparent reason. > > This shows in the simulator, and on the board it just freezes. > > I don't know what could be causing this as I've just string together a > load > of code that works individually (i.e. tested Uart stuff, tested the GPIO > stuff).. > > > > Just wondered if anyone had any ideas. > > > > Thanks > > Rob > > http://www.robs-projects.com/ > > > > > > [This message contained attachments] > > > > ________________________________________________________________________ > ________________________________________________________________________ > > Message: 16 > Date: Mon, 24 May 2004 11:44:11 -0600 > From: MaxStream - Ryan Bedwell <ryanb@...> > Subject: Re: interrupt vector table & IAP > > more_effective wrote: > > Hi everybody, > > We are trying to work with LPC2104 & Keil uVision3. > > > > If you take LPC2104 user's manual (2 oct 2003) you can read: > > "If user's code is runing from the on-chip RAM and an aplication > > uses > > interrupts, interrupt vectors must be re-mapped to flash > > address 0x0." (from page 70, VIC usage notes) > > > > BUT, you can also read: > > "The user should either disable interrupts, or ensure that user > > interrupt vectors are active in RAM and that the interrupt handlers > > reside in RAM, before making a flash erase/write IAP call." (from > > page 180, Interrupts during IAP) > > > > What we don't understand is the expression "ensure that user > > interrupt vectors are active in RAM". Active in RAM? We thought all > > interrupts & exceptions must be active in 0x0 and above (i.e., flash). > > Address 0 can appear in one of four places: the base of user flash, the > base of user RAM, in external memory (for parts that support this) or > somewhere in the Philips bootloader. You have to put your vectors in > one of the three user locations, then configure the remapping > appropriately via the MEMMAP register. > > If you're going to call IAP flash erase/write routines with interrupts > enabled, you would have to have the vectors and the routines in RAM (or > external memory) to ensure no access to the flash during the > erase/program operation. > > > BTW, can we manage to hace two APPs in flash with diferent interrupt > > vector tables? > > Probably the best way to accomplish this would be to have the vectors at > the base of user RAM, then simply swap them in and out to match the > application currently running. > > Ryan > > > > > ________________________________________________________________________ > ________________________________________________________________________ > > > > ------------------------------------------------------------------------ > Yahoo! Groups Links > > > > > ------------------------------------------------------------------------ > >