|
Hi all Once again, this is more a question regarding the Waferscale PSD8xx device, but maybe somebody can help me. I recently implemented a "Serial Software Update" function that allows our customers to update the software in their units using a serial link (instead of having to send us back the unit for JTAG programming). And as we've just released a new product on the market, already it is becoming an invaluable tool!!...(does this reflect badly on my programming?? ;->) However, I am now looking at being able to reprogram the boot sectors using a serial link. This is identical in principle to upgrading the Main Flash sectors (easier even). My problem arises in the event of a failure. If, between erasing the boot sectors and reprogramming them again, there is a comms failure and then the unit is powered off, it can never recover. I am wondering if it is at all possible to set something (using software) in the PSD chip to tell it not to load up in boot mode first and to go straight to it's Main Code? I'm sure this can be set in hardware, and I'm reasonably sure it can be set when JTAG programming, but I need to be able to do it dynamically in code!?? Any suggestions? Obviously when programming Boot Code etc the customer has to have some appreciation of the necessity of following instructions exactly, but there's always one...... Thanks for the help Pete |
|
|
|
Pete, Yes, you can use the PSD's CPLD to create a product term in your memory map to swap a main flash sector with a boot flash sector (and vice-versa). Hardware-wise, you could implement this using a PSD I/O pin (defined as a CPLD input), and write mem map equations such as: CSBOOT0 = 0xE000-0xFFFF & PB0 FS0 = 0xC000-0xFFFF & !PB0 Or Software-wise, similarly, you can use a 'page' bit as a product term, and set in software, jump into your other flash bank, and erase/reprogram. Regards, Alec --------------------------------------- Alec Bath Field Applications Engineer STMicroelectronics PSD & NVRAM Memory Products -----Original Message----- From: [mailto:] Sent: Thursday, January 30, 2003 8:26 AM To: Subject: [m68HC11] software configure of PSD8xx Hi all Once again, this is more a question regarding the Waferscale PSD8xx device, but maybe somebody can help me. I recently implemented a "Serial Software Update" function that allows our customers to update the software in their units using a serial link (instead of having to send us back the unit for JTAG programming). And as we've just released a new product on the market, already it is becoming an invaluable tool!!...(does this reflect badly on my programming?? ;->) However, I am now looking at being able to reprogram the boot sectors using a serial link. This is identical in principle to upgrading the Main Flash sectors (easier even). My problem arises in the event of a failure. If, between erasing the boot sectors and reprogramming them again, there is a comms failure and then the unit is powered off, it can never recover. I am wondering if it is at all possible to set something (using software) in the PSD chip to tell it not to load up in boot mode first and to go straight to it's Main Code? I'm sure this can be set in hardware, and I'm reasonably sure it can be set when JTAG programming, but I need to be able to do it dynamically in code!?? Any suggestions? Obviously when programming Boot Code etc the customer has to have some appreciation of the necessity of following instructions exactly, but there's always one...... Thanks for the help Pete To unsubscribe from this group, send an email to: [Non-text portions of this message have been removed] |
|
|
|
My problem is though, that when the unit powers on, it will always go to boot before I can tell it in software to ignore boot and go straight to main flash...! If I have erased my boot code in order to reprogram it and the unit somehow gets powered off, then the unit goes looking for boot and can't find it! At least I think that's my problem....this is more an exercise of thinking out loud.... But I appreciate the help Pete -----Original Message----- From: [mailto:] Sent: 30 January 2003 14:54 To: Subject: RE: [m68HC11] software configure of PSD8xx Pete, Yes, you can use the PSD's CPLD to create a product term in your memory map to swap a main flash sector with a boot flash sector (and vice-versa). Hardware-wise, you could implement this using a PSD I/O pin (defined as a CPLD input), and write mem map equations such as: CSBOOT0 = 0xE000-0xFFFF & PB0 FS0 = 0xC000-0xFFFF & !PB0 Or Software-wise, similarly, you can use a 'page' bit as a product term, and set in software, jump into your other flash bank, and erase/reprogram. Regards, Alec --------------------------------------- Alec Bath Field Applications Engineer STMicroelectronics PSD & NVRAM Memory Products -----Original Message----- From: [mailto:] Sent: Thursday, January 30, 2003 8:26 AM To: Subject: [m68HC11] software configure of PSD8xx Hi all Once again, this is more a question regarding the Waferscale PSD8xx device, but maybe somebody can help me. I recently implemented a "Serial Software Update" function that allows our customers to update the software in their units using a serial link (instead of having to send us back the unit for JTAG programming). And as we've just released a new product on the market, already it is becoming an invaluable tool!!...(does this reflect badly on my programming?? ;->) However, I am now looking at being able to reprogram the boot sectors using a serial link. This is identical in principle to upgrading the Main Flash sectors (easier even). My problem arises in the event of a failure. If, between erasing the boot sectors and reprogramming them again, there is a comms failure and then the unit is powered off, it can never recover. I am wondering if it is at all possible to set something (using software) in the PSD chip to tell it not to load up in boot mode first and to go straight to it's Main Code? I'm sure this can be set in hardware, and I'm reasonably sure it can be set when JTAG programming, but I need to be able to do it dynamically in code!?? Any suggestions? Obviously when programming Boot Code etc the customer has to have some appreciation of the necessity of following instructions exactly, but there's always one...... Thanks for the help Pete To unsubscribe from this group, send an email to: [Non-text portions of this message have been removed] To unsubscribe from this group, send an email to: |
|
I think what you propose is good for programming only, or for using a dip switch to select which sector to call CSBOOT before turning the device on. But from software how does one make the swapped sectors remain swapped after a reset so that only when the full upgrade is complete, the swap is made 'permanent' (until perhaps next upgrade)? Is this possible? Ideally, one wants to use one sector (or more) to execute the current version in order to program the new version in another sector (or more). Then, and only if the update completes without errors, swap the two sets of sectors so that next reboot will boot from the new code version. ----- Original Message ----- From: <> To: <> Sent: Thursday, January 30, 2003 4:54 PM Subject: RE: [m68HC11] software configure of PSD8xx > Pete, > > Yes, you can use the PSD's CPLD to create a product term in your memory > map to swap a main flash sector with a boot flash sector (and > vice-versa). > > Hardware-wise, you could implement this using a PSD I/O pin (defined as > a CPLD input), and write mem map equations such as: > > CSBOOT0 = 0xE000-0xFFFF & PB0 > FS0 = 0xC000-0xFFFF & !PB0 > > Or Software-wise, similarly, you can use a 'page' bit as a product term, > and set in software, jump into your other flash bank, and > erase/reprogram. > > Regards, > > Alec > --------------------------------------- > Alec Bath > Field Applications Engineer > STMicroelectronics > PSD & NVRAM Memory Products > -----Original Message----- > From: [mailto:] > Sent: Thursday, January 30, 2003 8:26 AM > To: > Subject: [m68HC11] software configure of PSD8xx > Hi all > > Once again, this is more a question regarding the Waferscale PSD8xx > device, > but maybe somebody can help me. > > I recently implemented a "Serial Software Update" function that allows > our > customers to update the software in their units using a serial link > (instead > of having to send us back the unit for JTAG programming). And as we've > just > released a new product on the market, already it is becoming an > invaluable > tool!!...(does this reflect badly on my programming?? ;->) > > However, I am now looking at being able to reprogram the boot sectors > using > a serial link. This is identical in principle to upgrading the Main > Flash > sectors (easier even). My problem arises in the event of a failure. > If, > between erasing the boot sectors and reprogramming them again, there is > a > comms failure and then the unit is powered off, it can never recover. > > I am wondering if it is at all possible to set something (using > software) in > the PSD chip to tell it not to load up in boot mode first and to go > straight > to it's Main Code? I'm sure this can be set in hardware, and I'm > reasonably > sure it can be set when JTAG programming, but I need to be able to do it > dynamically in code!?? > > Any suggestions? Obviously when programming Boot Code etc the customer > has > to have some appreciation of the necessity of following instructions > exactly, but there's always one...... > > Thanks for the help > > Pete |
|
|
|
Exactly Tony This is exactly what our old design does, but in our latest design, although we only need two of the available 4 boot sectors, we have no room to map the other two boot sectors in our memory map. We used to do the comms and CRC checking etc with the two empty sectors, and once we were happy everything was ok, we would copy over the code. Just trying to find an alternative solution..... Pete -----Original Message----- From: Tony Papadimitriou [mailto:] Sent: 30 January 2003 15:14 To: Subject: Re: [m68HC11] software configure of PSD8xx I think what you propose is good for programming only, or for using a dip switch to select which sector to call CSBOOT before turning the device on. But from software how does one make the swapped sectors remain swapped after a reset so that only when the full upgrade is complete, the swap is made 'permanent' (until perhaps next upgrade)? Is this possible? Ideally, one wants to use one sector (or more) to execute the current version in order to program the new version in another sector (or more). Then, and only if the update completes without errors, swap the two sets of sectors so that next reboot will boot from the new code version. ----- Original Message ----- From: <> To: <> Sent: Thursday, January 30, 2003 4:54 PM Subject: RE: [m68HC11] software configure of PSD8xx > Pete, > > Yes, you can use the PSD's CPLD to create a product term in your memory > map to swap a main flash sector with a boot flash sector (and > vice-versa). > > Hardware-wise, you could implement this using a PSD I/O pin (defined as > a CPLD input), and write mem map equations such as: > > CSBOOT0 = 0xE000-0xFFFF & PB0 > FS0 = 0xC000-0xFFFF & !PB0 > > Or Software-wise, similarly, you can use a 'page' bit as a product term, > and set in software, jump into your other flash bank, and > erase/reprogram. > > Regards, > > Alec > --------------------------------------- > Alec Bath > Field Applications Engineer > STMicroelectronics > PSD & NVRAM Memory Products > -----Original Message----- > From: [mailto:] > Sent: Thursday, January 30, 2003 8:26 AM > To: > Subject: [m68HC11] software configure of PSD8xx > Hi all > > Once again, this is more a question regarding the Waferscale PSD8xx > device, > but maybe somebody can help me. > > I recently implemented a "Serial Software Update" function that allows > our > customers to update the software in their units using a serial link > (instead > of having to send us back the unit for JTAG programming). And as we've > just > released a new product on the market, already it is becoming an > invaluable > tool!!...(does this reflect badly on my programming?? ;->) > > However, I am now looking at being able to reprogram the boot sectors > using > a serial link. This is identical in principle to upgrading the Main > Flash > sectors (easier even). My problem arises in the event of a failure. > If, > between erasing the boot sectors and reprogramming them again, there is > a > comms failure and then the unit is powered off, it can never recover. > > I am wondering if it is at all possible to set something (using > software) in > the PSD chip to tell it not to load up in boot mode first and to go > straight > to it's Main Code? I'm sure this can be set in hardware, and I'm > reasonably > sure it can be set when JTAG programming, but I need to be able to do it > dynamically in code!?? > > Any suggestions? Obviously when programming Boot Code etc the customer > has > to have some appreciation of the necessity of following instructions > exactly, but there's always one...... > > Thanks for the help > > Pete To unsubscribe from this group, send an email to: |
|
I see your point.. while there is no non-volatile register that could be used as a PT, you could minimize this runaway risk, depending on how your memory map is set up, by immediately writing to the HC11's Reset and XIRQ Vector locations, to point to your FSx location, after the boot sector is erased.. But I think using one I/O pin as a memory select (and perhaps an associated XIRQ jump, or other scheme to route your code to a known address range) is the cleanest way.. Alec -----Original Message----- From: [mailto:] Sent: Thursday, January 30, 2003 10:23 AM To: Subject: RE: [m68HC11] software configure of PSD8xx Exactly Tony This is exactly what our old design does, but in our latest design, although we only need two of the available 4 boot sectors, we have no room to map the other two boot sectors in our memory map. We used to do the comms and CRC checking etc with the two empty sectors, and once we were happy everything was ok, we would copy over the code. Just trying to find an alternative solution..... Pete -----Original Message----- From: Tony Papadimitriou [mailto:] Sent: 30 January 2003 15:14 To: Subject: Re: [m68HC11] software configure of PSD8xx I think what you propose is good for programming only, or for using a dip switch to select which sector to call CSBOOT before turning the device on. But from software how does one make the swapped sectors remain swapped after a reset so that only when the full upgrade is complete, the swap is made 'permanent' (until perhaps next upgrade)? Is this possible? Ideally, one wants to use one sector (or more) to execute the current version in order to program the new version in another sector (or more). Then, and only if the update completes without errors, swap the two sets of sectors so that next reboot will boot from the new code version. ----- Original Message ----- From: <> To: <> Sent: Thursday, January 30, 2003 4:54 PM Subject: RE: [m68HC11] software configure of PSD8xx > Pete, > > Yes, you can use the PSD's CPLD to create a product term in your memory > map to swap a main flash sector with a boot flash sector (and > vice-versa). > > Hardware-wise, you could implement this using a PSD I/O pin (defined as > a CPLD input), and write mem map equations such as: > > CSBOOT0 = 0xE000-0xFFFF & PB0 > FS0 = 0xC000-0xFFFF & !PB0 > > Or Software-wise, similarly, you can use a 'page' bit as a product term, > and set in software, jump into your other flash bank, and > erase/reprogram. > > Regards, > > Alec > --------------------------------------- > Alec Bath > Field Applications Engineer > STMicroelectronics > PSD & NVRAM Memory Products > -----Original Message----- > From: [mailto:] > Sent: Thursday, January 30, 2003 8:26 AM > To: > Subject: [m68HC11] software configure of PSD8xx > Hi all > > Once again, this is more a question regarding the Waferscale PSD8xx > device, > but maybe somebody can help me. > > I recently implemented a "Serial Software Update" function that allows > our > customers to update the software in their units using a serial link > (instead > of having to send us back the unit for JTAG programming). And as we've > just > released a new product on the market, already it is becoming an > invaluable > tool!!...(does this reflect badly on my programming?? ;->) > > However, I am now looking at being able to reprogram the boot sectors > using > a serial link. This is identical in principle to upgrading the Main > Flash > sectors (easier even). My problem arises in the event of a failure. > If, > between erasing the boot sectors and reprogramming them again, there is > a > comms failure and then the unit is powered off, it can never recover. > > I am wondering if it is at all possible to set something (using > software) in > the PSD chip to tell it not to load up in boot mode first and to go > straight > to it's Main Code? I'm sure this can be set in hardware, and I'm > reasonably > sure it can be set when JTAG programming, but I need to be able to do it > dynamically in code!?? > > Any suggestions? Obviously when programming Boot Code etc the customer > has > to have some appreciation of the necessity of following instructions > exactly, but there's always one...... > > Thanks for the help > > Pete To unsubscribe from this group, send an email to: To unsubscribe from this group, send an email to: [Non-text portions of this message have been removed] |
|
Hi Tony, Peter, I am using PSD9xx series of PSD flash in our existing product. I may need to use paging for similar configuration as you mentioned . What kind of C compiler you guys are using? I have ICC11 which does not support Paging. Thanks Himanshu Tony Papadimitriou wrote: > I think what you propose is good for programming only, or for using a > dip switch to select which sector to call CSBOOT before turning the > device on. But from software how does one make the swapped sectors > remain swapped after a reset so that only when the full upgrade is > complete, the swap is made 'permanent' (until perhaps next upgrade)? > Is this possible? > > Ideally, one wants to use one sector (or more) to execute the current > version in order to program the new version in another sector (or > more). Then, and only if the update completes without errors, swap > the two sets of sectors so that next reboot will boot from the new > code version. > > ----- Original Message ----- > From: <> > To: <> > Sent: Thursday, January 30, 2003 4:54 PM > Subject: RE: [m68HC11] software configure of PSD8xx > > > Pete, > > > > Yes, you can use the PSD's CPLD to create a product term in your > memory > > map to swap a main flash sector with a boot flash sector (and > > vice-versa). > > > > Hardware-wise, you could implement this using a PSD I/O pin (defined > as > > a CPLD input), and write mem map equations such as: > > > > CSBOOT0 = 0xE000-0xFFFF & PB0 > > FS0 = 0xC000-0xFFFF & !PB0 > > > > Or Software-wise, similarly, you can use a 'page' bit as a product > term, > > and set in software, jump into your other flash bank, and > > erase/reprogram. > > > > Regards, > > > > Alec > > > > > > --------------------------------------- > > Alec Bath > > Field Applications Engineer > > STMicroelectronics > > PSD & NVRAM Memory Products > > > > > > -----Original Message----- > > From: > [mailto:] > > Sent: Thursday, January 30, 2003 8:26 AM > > To: > > Subject: [m68HC11] software configure of PSD8xx > > > > > > Hi all > > > > Once again, this is more a question regarding the Waferscale PSD8xx > > device, > > but maybe somebody can help me. > > > > I recently implemented a "Serial Software Update" function that > allows > > our > > customers to update the software in their units using a serial link > > (instead > > of having to send us back the unit for JTAG programming). And as > we've > > just > > released a new product on the market, already it is becoming an > > invaluable > > tool!!...(does this reflect badly on my programming?? ;->) > > > > However, I am now looking at being able to reprogram the boot > sectors > > using > > a serial link. This is identical in principle to upgrading the Main > > Flash > > sectors (easier even). My problem arises in the event of a failure. > > If, > > between erasing the boot sectors and reprogramming them again, there > is > > a > > comms failure and then the unit is powered off, it can never > recover. > > > > I am wondering if it is at all possible to set something (using > > software) in > > the PSD chip to tell it not to load up in boot mode first and to go > > straight > > to it's Main Code? I'm sure this can be set in hardware, and I'm > > reasonably > > sure it can be set when JTAG programming, but I need to be able to > do it > > dynamically in code!?? > > > > Any suggestions? Obviously when programming Boot Code etc the > customer > > has > > to have some appreciation of the necessity of following instructions > > exactly, but there's always one...... > > > > Thanks for the help > > > > Pete > > To unsubscribe from this group, send an email to: -- Himanshu Trivedi Email : Project Engineer Tel : 603-332-6150 Doverflexo Electronics Fax : 603-332-3758 217 Pickering Road Web : www.dfe.com Rochester, NH-03867 |
|
|
|
Sorry, only assembly language here! Swapping execution pages is a bit tricky. For one thing, some, if not all, vectors must be available in all pages containing the vector address range. The same for the switching code, whether this is the SWI vector or a simple subroutine. This way, switching from page to page will not require any unrealistic precautions. On a couple applications I needed that, I used a slightly modified version my own OS11 to automatically switch pages as it switches tasks, so all switching is taken care of inside the OS. Breaking the program into distrinct pages within the same address range(s) is done 'manually' by creating separately assembled modules ORGed at the same location for each different page. However, I always keep the boot page fixed (i.e., vectors, switching code and all interrupt related subroutines), I only switch during OS calls (located in multiple pages) or major application components (e.g. complete tasks, again located in different pages). This way, switching is minimized both in terms of coding effort and execution complexity. A good pre-organization of the code layout is necessary for this to work well. Nothing is fully automatic at the assembler level, however. I suppose a similar approach must be taken with a C compiler, also. ----- Original Message ----- From: Himanshu Trivedi <> To: <> Sent: Monday, February 03, 2003 3:28 PM Subject: Re: [m68HC11] software configure of PSD8xx > Hi Tony, Peter, > > I am using PSD9xx series of PSD flash in our existing product. I may need to > use paging for similar configuration as you mentioned . What kind of C > compiler you guys are using? I have ICC11 which does not support Paging. > > Thanks Himanshu |
|
Hi Himanshu I use the ICC6811 compiler and xlink for linking. The bank switching is configured in the *.xcl file, and my version isn't exactly user friendly, but once you trawl through it all it's actually quite simple. This combined with the PSDSoft application, will look after the paging for you. To get the most out of the PSD9xx, you will almost definitely need to page. I use 8 pages of 32K for my main code, and 64 pages of 32K for my flash memory (data storage). To keep the vector table visible, I map one page to 0xC000 - 0xFFFF, and all the other pages are mapped from 0x0000 to 0x7FFF. Similarly in Boot, I map one page to 0xE000 - 0xFFFF. You can also write your code so that certain functions are not paged and switching is not required for them. Hope this helps Pete -----Original Message----- From: Himanshu Trivedi [mailto:] Sent: 03 February 2003 13:28 To: Subject: Re: [m68HC11] software configure of PSD8xx Hi Tony, Peter, I am using PSD9xx series of PSD flash in our existing product. I may need to use paging for similar configuration as you mentioned . What kind of C compiler you guys are using? I have ICC11 which does not support Paging. Thanks Himanshu Tony Papadimitriou wrote: > I think what you propose is good for programming only, or for using a > dip switch to select which sector to call CSBOOT before turning the > device on. But from software how does one make the swapped sectors > remain swapped after a reset so that only when the full upgrade is > complete, the swap is made 'permanent' (until perhaps next upgrade)? > Is this possible? > > Ideally, one wants to use one sector (or more) to execute the current > version in order to program the new version in another sector (or > more). Then, and only if the update completes without errors, swap > the two sets of sectors so that next reboot will boot from the new > code version. > > ----- Original Message ----- > From: <> > To: <> > Sent: Thursday, January 30, 2003 4:54 PM > Subject: RE: [m68HC11] software configure of PSD8xx > > > Pete, > > > > Yes, you can use the PSD's CPLD to create a product term in your > memory > > map to swap a main flash sector with a boot flash sector (and > > vice-versa). > > > > Hardware-wise, you could implement this using a PSD I/O pin (defined > as > > a CPLD input), and write mem map equations such as: > > > > CSBOOT0 = 0xE000-0xFFFF & PB0 > > FS0 = 0xC000-0xFFFF & !PB0 > > > > Or Software-wise, similarly, you can use a 'page' bit as a product > term, > > and set in software, jump into your other flash bank, and > > erase/reprogram. > > > > Regards, > > > > Alec > > > > > > --------------------------------------- > > Alec Bath > > Field Applications Engineer > > STMicroelectronics > > PSD & NVRAM Memory Products > > > > > > -----Original Message----- > > From: > [mailto:] > > Sent: Thursday, January 30, 2003 8:26 AM > > To: > > Subject: [m68HC11] software configure of PSD8xx > > > > > > Hi all > > > > Once again, this is more a question regarding the Waferscale PSD8xx > > device, > > but maybe somebody can help me. > > > > I recently implemented a "Serial Software Update" function that > allows > > our > > customers to update the software in their units using a serial link > > (instead > > of having to send us back the unit for JTAG programming). And as > we've > > just > > released a new product on the market, already it is becoming an > > invaluable > > tool!!...(does this reflect badly on my programming?? ;->) > > > > However, I am now looking at being able to reprogram the boot > sectors > > using > > a serial link. This is identical in principle to upgrading the Main > > Flash > > sectors (easier even). My problem arises in the event of a failure. > > If, > > between erasing the boot sectors and reprogramming them again, there > is > > a > > comms failure and then the unit is powered off, it can never > recover. > > > > I am wondering if it is at all possible to set something (using > > software) in > > the PSD chip to tell it not to load up in boot mode first and to go > > straight > > to it's Main Code? I'm sure this can be set in hardware, and I'm > > reasonably > > sure it can be set when JTAG programming, but I need to be able to > do it > > dynamically in code!?? > > > > Any suggestions? Obviously when programming Boot Code etc the > customer > > has > > to have some appreciation of the necessity of following instructions > > exactly, but there's always one...... > > > > Thanks for the help > > > > Pete > > To unsubscribe from this group, send an email to: -- Himanshu Trivedi Email : Project Engineer Tel : 603-332-6150 Doverflexo Electronics Fax : 603-332-3758 217 Pickering Road Web : www.dfe.com Rochester, NH-03867 To unsubscribe from this group, send an email to: |