SLAA450G April 2010 – April 2020
Because the BSL code resides in information memory, it is important to save and restore the DCO calibration data that is also stored in InfoA. During prototyping, this can be done manually:
; ================================================================
; Note that the user needs to ensure that DCO Cal Data is not
; erased during debugging - Read out from InfoA and hardcode
; two bytes in move commands below.
mov.b #YOUR_DEVICE_VALUE,&DCOCTL ; Copy from address 0x010FEh
mov.b #YOUR_DEVICE_VALUE,&BCSCTL1 ; Copy from address 0x010FFh
; Replace YOUR_DEVICE_VALUE with values gathered from actual
; device. Values look like that: 0b3h and 086h
; (CCS Debug -> Debugger -> Loading options: Load symbols only)
; ================================================================
In production, this is easier, because it can be assumed that information memory is empty and no erase is required prior to writing to it. The code should be changed to use the original data. Most production programmers such as the GANG430 also supports the "preserve" flash data feature.
; ================================================================
; For Mass production please enable cal data readout directly from
; InfoA. Empty devices should be programmed without erasing flash
; before. If erased first, CAL data is lost. But can be restored
; with FlashPro430 / GangPro430 programmers. www.elprotronic.com
mov.b &CALDCO_1MHZ,&DCOCTL ; Set DCO step + modulation
mov.b &CALBC1_1MHZ,&BCSCTL1 ; Set range
; ================================================================