Etape 7 : liaison UART SCI-A 57600 8N1 validee sur cible
Emission $T,...*XX et reception $C,...*XX conformes a docs/ESP32-UART.md. Trame mesuree a 129 caracteres, checksum XOR verifie independamment. Corrections trouvees au bring-up sur materiel : - StartCpuTimer0() manquant : ConfigCpuTimer() laisse le timer arrete, donc le tick d'emission ne se produisait jamais et rien ne partait sur la ligne. - Suppression de "%f" dans sprintf. Sur C28x le support flottant de printf passe par du long double 64 bits emule (frexpl/scalbnl/L$$DIV) : le CPU partait a PC=0 des le premier envoi. Formatage decimal manuel a la place, comme le prevoyait deja PROMPT §7 etape 7. - RXFFIENA n'etait pas arme dans SCIFFRX : aucune interruption de reception. - Recuperation de SCIRXST.RXERROR. Un FE/OE/PE/BRKDT le latche et bloque le recepteur jusqu'a un SW RESET du SCI ; sans ca une seule perturbation arretait la reception definitivement (constate : RXERROR+FE+BRKDT latches). - Formatage borne : clamp des valeurs (NaN et saturation) puis snprintf avec la capacite restante. Un champ qui ne tient pas est abandonne entierement, ce que le protocole autorise, plutot que de deborder s_tx_frame. - Emission non bloquante : send_telemetry() ne fait que mettre en attente, uart_link_service_tx() pousse au plus une FIFO (4 octets) puis rend la main. L'ancienne version monopolisait 22 ms par trame, incompatible avec la priorite donnee a la boucle de regulation. Plan memoire (F2802x_generic_flash.cmd) : - les 4 secteurs flash du F28027 sont declares (32K mots au lieu de 8K) - .ebss bascule en RAML0 : il etait colle juste apres .stack, donc tout debordement de pile ecrasait silencieusement les globales - pile portee a 1024 mots, seule dans RAMM1 LED : polarite reelle confirmee active-haut (cathode commune a la masse, anodes pilotees par GPIO12/GPIO33 a travers 1k) -> LED_ACTIVE_LOW = 0. Repond au point ouvert §9.2 du PROMPT. safety_init() reste desactive dans main.c : bring-up isole LED+UART, a reactiver quand l'etage de puissance sera cable. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@ -99,11 +99,16 @@ PAGE 0: /* Program Memory */
|
||||
|
||||
RAMM0 : origin = 0x000050, length = 0x0003B0 /* on-chip RAM block M0 */
|
||||
OTP : origin = 0x3D7800, length = 0x000400 /* on-chip OTP */
|
||||
FLASHA : origin = 0x3F7000, length = 0x000F80 /* on-chip FLASH */
|
||||
/* Les 4 secteurs flash du F28027 (32K mots au total, cf. common/cmd/F28027.cmd
|
||||
de C2000Ware). Le fichier "generic" d'origine ne declarait que le secteur A
|
||||
(~8K), ce qui faisait deborder le link des que le code grossissait. */
|
||||
FLASHD : origin = 0x3F0000, length = 0x002000 /* on-chip FLASH */
|
||||
FLASHC : origin = 0x3F2000, length = 0x002000 /* on-chip FLASH */
|
||||
FLASHB : origin = 0x3F4000, length = 0x002000 /* on-chip FLASH */
|
||||
FLASHA : origin = 0x3F6000, length = 0x001F80 /* on-chip FLASH */
|
||||
CSM_RSVD : origin = 0x3F7F80, length = 0x000076 /* Part of FLASHA. Program with all 0x0000 when CSM is in use. */
|
||||
BEGIN : origin = 0x3F7FF6, length = 0x000002 /* Part of FLASHA. Used for "boot to Flash" bootloader mode. */
|
||||
CSM_PWL_P0 : origin = 0x3F7FF8, length = 0x000008 /* Part of FLASHA. CSM password locations in FLASHA */
|
||||
FLASHB : origin = 0x3F6000, length = 0x001000 /* on-chip FLASH */
|
||||
|
||||
|
||||
|
||||
@ -121,7 +126,7 @@ PAGE 1 : /* Data Memory */
|
||||
|
||||
BOOT_RSVD : origin = 0x000000, length = 0x000050 /* Part of M0, BOOT rom will use this for stack */
|
||||
RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
|
||||
RAML0 : origin = 0x008000, length = 0x000400 /* on-chip RAM block L0 */
|
||||
RAML0 : origin = 0x008000, length = 0x001000 /* on-chip RAM block L0 (4K mots sur F28027) */
|
||||
|
||||
}
|
||||
|
||||
@ -145,25 +150,29 @@ SECTIONS
|
||||
RUN_START(_RamfuncsRunStart),
|
||||
PAGE = 0
|
||||
|
||||
.cinit : > FLASHA | FLASHB, PAGE = 0
|
||||
.pinit : > FLASHA | FLASHB, PAGE = 0
|
||||
.text : >> FLASHA | FLASHB, PAGE = 0
|
||||
.cinit : > FLASHA | FLASHB | FLASHC | FLASHD, PAGE = 0
|
||||
.pinit : > FLASHA | FLASHB | FLASHC | FLASHD, PAGE = 0
|
||||
.text : >> FLASHA | FLASHB | FLASHC | FLASHD, PAGE = 0
|
||||
|
||||
csmpasswds : > CSM_PWL_P0, PAGE = 0
|
||||
csm_rsvd : > CSM_RSVD, PAGE = 0
|
||||
|
||||
/* Allocate uninitalized data sections: */
|
||||
/* .ebss place en RAML0 EN PREMIER (et non RAMM1) : sinon les globales se
|
||||
retrouvent collees juste apres .stack, et un debordement de pile les
|
||||
ecrase silencieusement au lieu de tomber dans du vide. RAMM1 est ainsi
|
||||
reserve a la pile seule. */
|
||||
.stack : > RAMM1, PAGE = 1
|
||||
.ebss : >> RAMM1 | RAML0, PAGE = 1
|
||||
.esysmem : >> RAMM1 | RAML0, PAGE = 1
|
||||
.ebss : >> RAML0 | RAMM1, PAGE = 1
|
||||
.esysmem : >> RAML0 | RAMM1, PAGE = 1
|
||||
|
||||
/* Initalized sections go in Flash */
|
||||
/* For SDFlash to program these, they must be allocated to page 0 */
|
||||
.econst : >> FLASHA | FLASHB, PAGE = 0
|
||||
.switch : >> FLASHA | FLASHB, PAGE = 0
|
||||
.econst : >> FLASHA | FLASHB | FLASHC | FLASHD, PAGE = 0
|
||||
.switch : >> FLASHA | FLASHB | FLASHC | FLASHD, PAGE = 0
|
||||
|
||||
/* Allocate IQ math areas: */
|
||||
IQmath : >> FLASHA | FLASHB, PAGE = 0 /* Math Code */
|
||||
IQmath : >> FLASHA | FLASHB | FLASHC | FLASHD, PAGE = 0 /* Math Code */
|
||||
IQmathTables : > IQTABLES, PAGE = 0, TYPE = NOLOAD
|
||||
|
||||
/* Uncomment the section below if calling the IQNexp() or IQexp()
|
||||
|
||||
Reference in New Issue
Block a user