From df78f5109c86cd2a1e9314138959738d1a33f039 Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Sun, 7 Apr 2024 15:15:35 +1000 Subject: [PATCH] Disable the OFF Open Load pull-down current on MC33810 init --- speeduino/acc_mc33810.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/speeduino/acc_mc33810.cpp b/speeduino/acc_mc33810.cpp index a5c09ab7..9661a0c4 100644 --- a/speeduino/acc_mc33810.cpp +++ b/speeduino/acc_mc33810.cpp @@ -44,7 +44,7 @@ void initMC33810(void) SPI.begin(); //These are the SPI settings per the datasheet - SPI.beginTransaction(SPISettings(6000000, MSBFIRST, SPI_MODE0)); + SPI.beginTransaction(SPISettings(6000000, MSBFIRST, SPI_MODE0)); //Set the ignition outputs to GPGD mode /* @@ -62,5 +62,22 @@ void initMC33810(void) MC33810_2_ACTIVE(); SPI.transfer16(cmd); MC33810_2_INACTIVE(); + + //Disable the Open Load pull-down current sync (See page 31 of MC33810 DS) + /* + 0010 = LSD Fault Command + 1000 = LSD Fault operation is Shutdown (Default) + 1111 = Open load detection fault when active (Default) + 0000 = Disable open load detection when off (Changed from 1111 to 0000) + */ + cmd = 0b0010100011110000; + //IC1 + MC33810_1_ACTIVE(); + SPI.transfer16(cmd); + MC33810_1_INACTIVE(); + //IC2 + MC33810_2_ACTIVE(); + SPI.transfer16(cmd); + MC33810_2_INACTIVE(); } \ No newline at end of file