Method and system of updating shared memory
First Claim
1. For use with a battery monitoring system (BMS) having an application operable to measure current flow to a vehicle battery and a launcher operable to enable drivers utilized by the application, both of the launcher and the application implementing communication with a vehicle bus according to communication code written to a shared memory block, a method of updating communication code currently written to the shared memory block with new communication code, the method comprising:
- writing the new communication code to an application memory block having application code used to operate the application, the application being inoperable while the new communication code is being written to the application memory block;
executing communications based on the communication code previously written to the shared memory block while the new communication code is being written to the application memory block;
copying the new communication code from the application memory block to the shared memory block, the communications with the vehicle bus supported by the communication code written to the shared memory block being inoperable while the new communication code is being written to the shared memory block;
executing communications with the vehicle bus based on the new communication code written to the application memory block while the new communication code is being copied to the shared memory block, and thereafter, executing additional communications with the vehicle bus based on the new communication code written to the shared memory block;
re-writing application code to the application memory block written over with the new communication code after completing the copying of the new communication code to the shared memory block, the application becoming operational after the application code is completely re-written to the application memory block;
validating the new communication code written to the application memory block with a checksum operation prior to copying the new communication code to the shared memory block;
preventing the new communication code from being copied to the shared memory block in response to the checksum operation failing to validate the new communication code; and
re-executing writing the new communication code in response to the checksum operation failing to validate the new communication code.
5 Assignments
0 Petitions
Accused Products
Abstract
A method and system is disclosed for updating a shared memory or other memory location where multiple entities rely on code stored to the same memory to support one or more operation functions. The shared memory may be updated such that the code intended to the replace the currently stored code may be relied upon prior to replacement of the code currently written to the shared memory.
60 Citations
12 Claims
-
1. For use with a battery monitoring system (BMS) having an application operable to measure current flow to a vehicle battery and a launcher operable to enable drivers utilized by the application, both of the launcher and the application implementing communication with a vehicle bus according to communication code written to a shared memory block, a method of updating communication code currently written to the shared memory block with new communication code, the method comprising:
-
writing the new communication code to an application memory block having application code used to operate the application, the application being inoperable while the new communication code is being written to the application memory block; executing communications based on the communication code previously written to the shared memory block while the new communication code is being written to the application memory block; copying the new communication code from the application memory block to the shared memory block, the communications with the vehicle bus supported by the communication code written to the shared memory block being inoperable while the new communication code is being written to the shared memory block; executing communications with the vehicle bus based on the new communication code written to the application memory block while the new communication code is being copied to the shared memory block, and thereafter, executing additional communications with the vehicle bus based on the new communication code written to the shared memory block; re-writing application code to the application memory block written over with the new communication code after completing the copying of the new communication code to the shared memory block, the application becoming operational after the application code is completely re-written to the application memory block; validating the new communication code written to the application memory block with a checksum operation prior to copying the new communication code to the shared memory block; preventing the new communication code from being copied to the shared memory block in response to the checksum operation failing to validate the new communication code; and re-executing writing the new communication code in response to the checksum operation failing to validate the new communication code. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A controller comprising;
-
a central processing unit (CPU) operable to execute code to enable operations of the controller according to instructions read from; (i) a launcher memory block having code stored to facilitate operation of a launcher, the launcher being configured to enable drivers of a battery monitoring system (BMS) included within a vehicle to monitor to a vehicle battery; (ii) an application memory block having code stored to facilitate operation of an application, the application being configured to measure current flow of the vehicle battery; and (iii) a shared memory block having communication code shared by each of the launcher and the application to facilitate communications with a vehicle bus; wherein the shared memory block stores code required by each of the launcher and the application to enable communications of a type where data is exchanged over a vehicle network with at least one of a master controller and a vehicle controller connected to the vehicle network; wherein the launcher is operable to execute a bootloader that enables updating of the shared memory block without disabling communications; wherein the bootloader is operable to facilitate updating a first set of code stored to the shared memory block with a second set of code, and to write the second set of code to a temporal portion of the application memory block prior to being copied to the shared memory block; wherein the bootloader is further operable to execute communications according to the second set of code stored at the application memory block while the second set of code is being copied from the application memory block to the shared memory block; and wherein the bootloader is further operable to prevent the second set of code from being copied to the shared memory in the event a checksum of the second set of code fails to match a checksum value and to re-execute updating the first set of code stored to the shared memory block with the second set of code in the event the checksum of the second set of code fails to match the checksum value. - View Dependent Claims (7, 8, 9, 10, 11)
-
-
12. An apparatus for use with a battery monitoring system (BMS) including an application operable to measure current flow to a vehicle battery and a launcher operable to enable drivers utilized by the application, both of the launcher and the application implementing communication with a vehicle bus according to communication code written to a shared memory block, the apparatus for updating communication code currently written to the shared memory block with new communication code, the apparatus comprising:
a controller configured to; write the new communication code to an application memory block having application code used to operate the application, the application being inoperable while the new communication code is being written to the application memory block; execute communications based on the communication code previously written to the shared memory block while the new communication code is being written to the application memory block; copy the new communication code from the application memory block to the shared memory block, the communications with the vehicle bus supported by the communication code written to the shared memory block being inoperable while the new communication code is being written to the shared memory block; execute communications with the vehicle bus based on the new communication code written to the application memory block while the new communication code is being copied to the shared memory block, and thereafter, executing additional communications with the vehicle bus based on the new communication code written to the shared memory block; re-write application code to the application memory block written over with the new communication code after completing the copying of the new communication code to the shared memory block, the application becoming operational after the application code is completely re-written to the application memory block; validate the new communication code written to the application memory block with a checksum operation prior to copying the new communication code to the shared memory block; prevent the new communication code from being copied to the shared memory block in response to the checksum operation failing to validate the new communication code; and re-execute writing the new communication code in response to the checksum operation failing to validate the new communication code.
Specification