Skip to content

Commit

Permalink
Disable the OFF Open Load pull-down current on MC33810 init
Browse files Browse the repository at this point in the history
  • Loading branch information
noisymime committed Apr 7, 2024
1 parent a94b123 commit df78f51
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion speeduino/acc_mc33810.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
/*
Expand All @@ -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();

}

0 comments on commit df78f51

Please sign in to comment.