2005-03-08 05:09 AM
2005-03-08 12:23 AM
I am trying to marry up the USB bulk transfer example with the standard libraries so I can add extra functionality.
I have replaced the vectors.s file with 71x_vect.s however when an interrupt occurs the following problem happens First the IRQHandler code in 71x_vect is called, this seems correct The following instructions are executed SUB lr,lr,#4 ; Update the link register SaveContext r0,r11 ; Save the workspace plus the current ; return address lr_ irq and spsr_irq. LDR lr, =ReturnAddress ; Read the return address. LDR r0, =EIC_base_addr LDR r1, =IVR_off_addr ADD pc,r0,r1 ; Branch to the IRQ handler. However r0 contains 0xFFFFF800 an r1 contains 0x18 so the PC is then set to 0xFFFFF818 which is an invalid area and an exception occurs. This code is taken from the standard libraries what is it trying to do and can you think of what I may have missed. P. [ This message was edited by: ReservoirGerbils on 08-03-2005 13:55 ]2005-03-08 04:29 AM
I am using the 71x_init.s file from the standard librarie. However looking at the 71x_map.h file it uses #define EIC_BASE 0xE000F800 whereas the 71x_init.s has the EIC_Base_addr is set to the correct 0xFFFFF800.
The map file did have the correct address for EIC_base but was commented out. How therefore did the USB bulk transfer example ever work when the USB_prop file refers to the EIC register which must come from the map file and therefore be the wrong value or am I missing something. P.2005-03-08 04:49 AM
I had to do a lot of changes to get the bulk demo to work with our demo board str71 based.
Find project attached - it is gcc though but the code is the same. Regards sjo ________________ Attachments : USBBulk.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtJJ&d=%2Fa%2F0X0000000aLR%2FdwpE_GxIsU7xDclYIjc6AGMrGwgHQ0FYVX2UKqOB1uQ&asPdf=false