Ive been working on porting the high speed logging protocol from PRJ's files to the 3B ECU. there is just enough code space on both motor and boost chips to house the added code. to catch anyone up who's interested in this up on what i know about how the protocol works is as follows. the protocol in PRJ's runs at 187500 baud. the process starts on the boost chip side of the ECU where it transmits its RAM data first followed by 0xAA and 0xBB. the purpose of 0xAA and 0xBB is to let the motor chip side of the ECU transmit its RAM data next. pretty smart!
Now i have a 3B boost chip modified to start but im not getting the right data from it. Im using a program called coolterm to monitor the raw HEX output from the ECU. I have been looking for the 0xAA and 0xBB coming from the boost chip but that data is never sent specifically. Im not sure if this is a baud rate issue or simply a code error that im not seeing. there is a picture of the data output from coolterm of what the ECU is giving me from the boost chip. im using a stock motor chip for this testing because i did not want to over complicate the process of getting this to work.
The forum wont let me post the IDB for idapro directly so this is the current added code. maybe someone will see an error that im not and help me correct it. the boost chip im using is the 551A from AAN actually because it has the overboost function and such that the 3B never had plus its more similar to the RS2 boost chip that PRJ used. any input as to why its giving me the wrong data would be great. once this works i'll post it up here in the forum with a working ADX for tuner pro and a working winlog plugin/dash for those who prefer that.
Now i have a 3B boost chip modified to start but im not getting the right data from it. Im using a program called coolterm to monitor the raw HEX output from the ECU. I have been looking for the 0xAA and 0xBB coming from the boost chip but that data is never sent specifically. Im not sure if this is a baud rate issue or simply a code error that im not seeing. there is a picture of the data output from coolterm of what the ECU is giving me from the boost chip. im using a stock motor chip for this testing because i did not want to over complicate the process of getting this to work.
The forum wont let me post the IDB for idapro directly so this is the current added code. maybe someone will see an error that im not and help me correct it. the boost chip im using is the 551A from AAN actually because it has the overboost function and such that the 3B never had plus its more similar to the RS2 boost chip that PRJ used. any input as to why its giving me the wrong data would be great. once this works i'll post it up here in the forum with a working ADX for tuner pro and a working winlog plugin/dash for those who prefer that.
Code:
code:000001CE ; =============== S U B R O U T I N E ======================================= code:000001CE code:000001CE code:000001CE Logging_Code_01: ; CODE XREF: IE0+B0E↓p code:000001CE C0 83 push DPH ; Data Pointer, High Byte code:000001D0 C0 82 push DPL ; Data Pointer, Low Byte code:000001D2 90 1F F0 mov DPTR, #Logging_On_Off ; Move (Op1 <- Op2) code:000001D5 E4 clr A ; Clear Operand (0) code:000001D6 93 movc A, @A+DPTR ; Move code byte relative to second op to Acc code:000001D7 70 1B jnz code_1F4 ; Jump if Acc is not zero code:000001D9 20 AC 16 jb IEN0.4, code_1F2 ; Jump if serial channel 0 interrupt is not enabled. code:000001DC 78 B2 mov R0, #0xB2 ; Move (Op1 <- Op2) code:000001DE 16 dec @R0 ; Decrement Operand code:000001DF E6 mov A, @R0 ; Move (Op1 <- Op2) code:000001E0 70 10 jnz code_1F2 ; Jump if Acc is not zero code:000001E2 75 87 00 mov PCON, #0 ; Set Baud Rate. code:000001E5 75 98 98 mov SCON, #0x98 ; Serial Channel Control Reg. code:000001E8 76 12 mov @R0, #0x12 ; Move (Op1 <- Op2) code:000001EA 75 7E FF mov Open_RAM_7E, #0xFF ; Move (Op1 <- Op2) code:000001ED 85 49 99 mov SBUF, RAM_49 ; Serial Channel Buffer Reg. code:000001F0 D2 AC setb IEN0.4 ; Interrupt Enable Register 0 code:000001F2 code:000001F2 code_1F2: ; CODE XREF: Logging_Code_01+B↑j code:000001F2 ; Logging_Code_01+12↑j code:000001F2 D2 18 setb RAM_23.0 ; Set Direct Bit code:000001F4 code:000001F4 code_1F4: ; CODE XREF: Logging_Code_01+9↑j code:000001F4 D0 82 pop DPL ; Data Pointer, Low Byte code:000001F6 D0 83 pop DPH ; Data Pointer, High Byte code:000001F8 75 F0 00 mov B, #0 ; B-Register code:000001FB 22 ret ; Return from subroutine code:000001FB ; End of function Logging_Code_01
Code:
code:00000EE6 ; --------------------------------------------------------------------------- code:00000EE6 code:00000EE6 Logging_Code_02: ; CODE XREF: code_15BA+5↓j code:00000EE6 90 1F F0 mov DPTR, #Logging_On_Off ; Move (Op1 <- Op2) code:00000EE9 93 movc A, @A+DPTR ; Move code byte relative to second op to Acc code:00000EEA 60 07 jz code_EF3 ; Jump if Acc is zero code:00000EEC E4 clr A ; Clear Operand (0) code:00000EED 90 18 5E mov DPTR, #0x185E ; Move (Op1 <- Op2) code:00000EF0 02 15 C2 ljmp code_15C2 ; Long Jump code:00000EF3 ; --------------------------------------------------------------------------- code:00000EF3 code:00000EF3 code_EF3: ; CODE XREF: code_EA7+43↑j code:00000EF3 D0 83 pop DPH ; Data Pointer, High Byte code:00000EF5 D0 82 pop DPL ; Data Pointer, Low Byte code:00000EF7 22 ret ; Return from subroutine code:00000EF7 ; ---------------------------------------------------------------------------
Code:
0016CF ; =============== S U B R O U T I N E ======================================= code:000016CF code:000016CF code:000016CF Logging_Code_03: ; CODE XREF: IE0+43B↑p code:000016CF 50 06 jnc code_16D7 ; Jump if Carry is clear code:000016D1 F5 6B mov RAM_6B, A ; Move (Op1 <- Op2) code:000016D3 2C add A, R4 ; Add Second Operand to Acc code:000016D4 FC mov R4, A ; Move (Op1 <- Op2) code:000016D5 80 03 sjmp code_16DA ; Short jump code:000016D7 ; --------------------------------------------------------------------------- code:000016D7 code:000016D7 code_16D7: ; CODE XREF: Logging_Code_03↑j code:000016D7 75 6B 00 mov RAM_6B, #0 ; Move (Op1 <- Op2) code:000016DA code:000016DA code_16DA: ; CODE XREF: Logging_Code_03+6↑j code:000016DA E5 50 mov A, RAM_50 ; Move (Op1 <- Op2) code:000016DC 22 ret ; Return from subroutine code:000016DC ; End of function Logging_Code_03 code:000016DC code:000016DC ; ---------------------------------------------------------------------------
Code:
001A43 ; =============== S U B R O U T I N E ======================================= code:00001A43 code:00001A43 code:00001A43 Logging_Code_04: ; CODE XREF: RI_TI↑j code:00001A43 C0 83 push DPH ; Data Pointer, High Byte code:00001A45 C0 82 push DPL ; Data Pointer, Low Byte code:00001A47 C0 E0 push ACC ; Accumulator code:00001A49 90 1F F0 mov DPTR, #Logging_On_Off ; Move (Op1 <- Op2) code:00001A4C E4 clr A ; Clear Operand (0) code:00001A4D 93 movc A, @A+DPTR ; Move code byte relative to second op to Acc code:00001A4E 60 0F jz code_1A5F ; Jump if Acc is zero code:00001A50 D0 E0 pop ACC ; Accumulator code:00001A52 D0 82 pop DPL ; Data Pointer, Low Byte code:00001A54 D0 83 pop DPH ; Data Pointer, High Byte code:00001A56 10 98 03 jbc SCON.0, code_1A5C ; If SCON.0 is set go to Disable serial channel 0 interrupt, code:00001A56 ; if not clear SCON.0. code:00001A59 C2 99 clr SCON.1 ; Stop Serial transmission. code:00001A5B 32 reti ; Return from Interrupt code:00001A5C ; --------------------------------------------------------------------------- code:00001A5C code:00001A5C code_1A5C: ; CODE XREF: Logging_Code_04+13↑j code:00001A5C C2 AC clr IEN0.4 ; Disable serial channel 0 interrupt. code:00001A5E 32 reti ; Return from Interrupt code:00001A5F ; --------------------------------------------------------------------------- code:00001A5F code:00001A5F code_1A5F: ; CODE XREF: Logging_Code_04+B↑j code:00001A5F 10 99 09 jbc SCON.1, code_1A6B ; If SCON.1 is set go to transmit logging data, code:00001A5F ; if not clear SCON.0. code:00001A5F ; code:00001A5F ; SCON.1 set=8 bit data, 1 stop bit, 1 start bit. code:00001A62 C2 98 clr SCON.0 ; Serial Channel Control Reg. code:00001A64 D0 E0 pop ACC ; Accumulator code:00001A66 D0 82 pop DPL ; Data Pointer, Low Byte code:00001A68 D0 83 pop DPH ; Data Pointer, High Byte code:00001A6A 32 reti ; Return from Interrupt code:00001A6B ; --------------------------------------------------------------------------- code:00001A6B code:00001A6B code_1A6B: ; CODE XREF: Logging_Code_04:code_1A5F↑j code:00001A6B C0 D0 push PSW ; Program Status Word Register code:00001A6D C0 F0 push B ; B-Register code:00001A6F 05 7E inc Open_RAM_7E ; Increment Operand code:00001A71 E5 7E mov A, Open_RAM_7E ; Move (Op1 <- Op2) code:00001A73 75 F0 02 mov B, #2 ; B-Register code:00001A76 A4 mul AB ; Multiply Acc by B code:00001A77 D0 F0 pop B ; B-Register code:00001A79 D0 D0 pop PSW ; Program Status Word Register code:00001A7B 90 1F 60 mov DPTR, #Logging_RAM ; Move (Op1 <- Op2) code:00001A7E 73 jmp @A+DPTR ; Jump indirect relative to Data Pointer code:00001A7E ; End of function Logging_Code_04 code:00001A7E code:00001A7E ; ---------------------------------------------------------------------------
Code:
1F60 code:00001F60 ; =============== S U B R O U T I N E ======================================= code:00001F60 code:00001F60 code:00001F60 Logging_RAM: ; DATA XREF: Logging_Code_04+38↑o code:00001F60 80 1A sjmp code_1F7C ; Short jump code:00001F62 ; --------------------------------------------------------------------------- code:00001F62 80 1D sjmp code_1F81 ; Short jump code:00001F64 ; --------------------------------------------------------------------------- code:00001F64 80 20 sjmp code_1F86 ; Short jump code:00001F66 ; --------------------------------------------------------------------------- code:00001F66 80 23 sjmp code_1F8B ; Short jump code:00001F68 ; --------------------------------------------------------------------------- code:00001F68 80 26 sjmp code_1F90 ; Short jump code:00001F6A ; --------------------------------------------------------------------------- code:00001F6A 80 30 sjmp code_1F9C ; Short jump code:00001F6C ; --------------------------------------------------------------------------- code:00001F6C 80 3A sjmp code_1FA8 ; Short jump code:00001F6E ; --------------------------------------------------------------------------- code:00001F6E 80 44 sjmp code_1FB4 ; Short jump code:00001F70 ; --------------------------------------------------------------------------- code:00001F70 80 4E sjmp code_1FC0 ; Short jump code:00001F72 ; --------------------------------------------------------------------------- code:00001F72 80 58 sjmp code_1FCC ; Short jump code:00001F74 ; --------------------------------------------------------------------------- code:00001F74 80 5E sjmp code_1FD4 ; Short jump code:00001F76 ; --------------------------------------------------------------------------- code:00001F76 80 61 sjmp code_1FD9 ; Short jump code:00001F78 ; --------------------------------------------------------------------------- code:00001F78 80 64 sjmp code_1FDE ; Short jump code:00001F7A ; --------------------------------------------------------------------------- code:00001F7A 80 67 sjmp code_1FE3 ; Short jump code:00001F7C ; --------------------------------------------------------------------------- code:00001F7C code:00001F7C code_1F7C: ; CODE XREF: Logging_RAM↑j code:00001F7C 85 49 99 mov SBUF, RAM_49 ; Serial Channel Buffer Reg. code:00001F7F 80 64 sjmp code_1FE5 ; Short jump code:00001F81 ; --------------------------------------------------------------------------- code:00001F81 code:00001F81 code_1F81: ; CODE XREF: Logging_RAM+2↑j code:00001F81 85 71 99 mov SBUF, RAM_71 ; Serial Channel Buffer Reg. code:00001F84 80 5F sjmp code_1FE5 ; Short jump code:00001F86 ; --------------------------------------------------------------------------- code:00001F86 code:00001F86 code_1F86: ; CODE XREF: Logging_RAM+4↑j code:00001F86 85 6D 99 mov SBUF, RAM_6D ; Serial Channel Buffer Reg. code:00001F89 80 5A sjmp code_1FE5 ; Short jump code:00001F8B ; --------------------------------------------------------------------------- code:00001F8B code:00001F8B code_1F8B: ; CODE XREF: Logging_RAM+6↑j code:00001F8B 85 72 99 mov SBUF, RAM_72 ; Serial Channel Buffer Reg. code:00001F8E 80 55 sjmp code_1FE5 ; Short jump code:00001F90 ; --------------------------------------------------------------------------- code:00001F90 code:00001F90 code_1F90: ; CODE XREF: Logging_RAM+8↑j code:00001F90 E8 mov A, R0 ; Move (Op1 <- Op2) code:00001F91 C0 E0 push ACC ; Accumulator code:00001F93 78 D2 mov R0, #0xD2 ; Move (Op1 <- Op2) code:00001F95 86 99 mov SBUF, @R0 ; Serial Channel Buffer Reg. code:00001F97 D0 E0 pop ACC ; Accumulator code:00001F99 F8 mov R0, A ; Move (Op1 <- Op2) code:00001F9A 80 49 sjmp code_1FE5 ; Short jump code:00001F9C ; --------------------------------------------------------------------------- code:00001F9C code:00001F9C code_1F9C: ; CODE XREF: Logging_RAM+A↑j code:00001F9C E8 mov A, R0 ; Move (Op1 <- Op2) code:00001F9D C0 E0 push ACC ; Accumulator code:00001F9F 78 D3 mov R0, #0xD3 ; Move (Op1 <- Op2) code:00001FA1 86 99 mov SBUF, @R0 ; Serial Channel Buffer Reg. code:00001FA3 D0 E0 pop ACC ; Accumulator code:00001FA5 F8 mov R0, A ; Move (Op1 <- Op2) code:00001FA6 80 3D sjmp code_1FE5 ; Short jump code:00001FA8 ; --------------------------------------------------------------------------- code:00001FA8 code:00001FA8 code_1FA8: ; CODE XREF: Logging_RAM+C↑j code:00001FA8 E8 mov A, R0 ; Move (Op1 <- Op2) code:00001FA9 C0 E0 push ACC ; Accumulator code:00001FAB 78 D4 mov R0, #0xD4 ; Move (Op1 <- Op2) code:00001FAD 86 99 mov SBUF, @R0 ; Serial Channel Buffer Reg. code:00001FAF D0 E0 pop ACC ; Accumulator code:00001FB1 F8 mov R0, A ; Move (Op1 <- Op2) code:00001FB2 80 31 sjmp code_1FE5 ; Short jump code:00001FB4 ; --------------------------------------------------------------------------- code:00001FB4 code:00001FB4 code_1FB4: ; CODE XREF: Logging_RAM+E↑j code:00001FB4 E8 mov A, R0 ; Move (Op1 <- Op2) code:00001FB5 C0 E0 push ACC ; Accumulator code:00001FB7 78 D5 mov R0, #0xD5 ; Move (Op1 <- Op2) code:00001FB9 86 99 mov SBUF, @R0 ; Serial Channel Buffer Reg. code:00001FBB D0 E0 pop ACC ; Accumulator code:00001FBD F8 mov R0, A ; Move (Op1 <- Op2) code:00001FBE 80 25 sjmp code_1FE5 ; Short jump code:00001FC0 ; --------------------------------------------------------------------------- code:00001FC0 code:00001FC0 code_1FC0: ; CODE XREF: Logging_RAM+10↑j code:00001FC0 E8 mov A, R0 ; Move (Op1 <- Op2) code:00001FC1 C0 E0 push ACC ; Accumulator code:00001FC3 78 D6 mov R0, #0xD6 ; Move (Op1 <- Op2) code:00001FC5 86 99 mov SBUF, @R0 ; Serial Channel Buffer Reg. code:00001FC7 D0 E0 pop ACC ; Accumulator code:00001FC9 F8 mov R0, A ; Move (Op1 <- Op2) code:00001FCA 80 19 sjmp code_1FE5 ; Short jump code:00001FCC ; --------------------------------------------------------------------------- code:00001FCC code:00001FCC code_1FCC: ; CODE XREF: Logging_RAM+12↑j code:00001FCC 90 00 78 mov DPTR, #0x78 ; 'x' ; Move (Op1 <- Op2) code:00001FCF E0 movx A, @DPTR ; Move from/to external RAM code:00001FD0 F5 99 mov SBUF, A ; Serial Channel Buffer Reg. code:00001FD2 80 11 sjmp code_1FE5 ; Short jump code:00001FD4 ; --------------------------------------------------------------------------- code:00001FD4 code:00001FD4 code_1FD4: ; CODE XREF: Logging_RAM+14↑j code:00001FD4 85 6B 99 mov SBUF, RAM_6B ; Serial Channel Buffer Reg. code:00001FD7 80 0C sjmp code_1FE5 ; Short jump code:00001FD9 ; --------------------------------------------------------------------------- code:00001FD9 code:00001FD9 code_1FD9: ; CODE XREF: Logging_RAM+16↑j code:00001FD9 75 99 AA mov SBUF, #0xAA ; Serial Channel Buffer Reg. code:00001FDC 80 07 sjmp code_1FE5 ; Short jump code:00001FDE ; --------------------------------------------------------------------------- code:00001FDE code:00001FDE code_1FDE: ; CODE XREF: Logging_RAM+18↑j code:00001FDE 75 99 BB mov SBUF, #0xBB ; Serial Channel Buffer Reg. code:00001FE1 80 02 sjmp code_1FE5 ; Short jump code:00001FE3 ; --------------------------------------------------------------------------- code:00001FE3 code:00001FE3 code_1FE3: ; CODE XREF: Logging_RAM+1A↑j code:00001FE3 C2 AC clr IEN0.4 ; Disable serial channel 0 interrupt. code:00001FE5 code:00001FE5 code_1FE5: ; CODE XREF: Logging_RAM+1F↑j code:00001FE5 ; Logging_RAM+24↑j ... code:00001FE5 D0 E0 pop ACC ; Accumulator code:00001FE7 D0 82 pop DPL ; Data Pointer, Low Byte code:00001FE9 D0 83 pop DPH ; Data Pointer, High Byte code:00001FEB 32 reti ; Return from Interrupt code:00001FEB ; End of function Logging_RAM code:00001FEB code:00001FEB ; ---------------------------------------------------------------------------
Comment