Northeastern-Electric-Racing / Cerberus

Our FreeRTOS-based vehicle control application
1 stars 0 forks source link

LTC4015 Peripheral Modeling #26

Closed nwdepatie closed 9 months ago

nwdepatie commented 1 year ago

We need to have a C# file that is able to correctly mimic the behavior of the LTC4015 LV Load Switch IC (Link to Datasheet here). This needs to utilize the Renode framework, and will integrate with the ltc4015 driver located in Drivers/NER/src/ltc4015.c and the corresponding header file in that include directory above it.

For reference on what Renode is and what the C# file might look like, look at this confluence page. Note that the initial setup of the Renode machine is contained within the ner-gcc-arm docker container and the initial config of the machine is contained within cerberus.resc (after running renode in the docker container, run i @cerberus.resc to initialize) Also check out these resources: https://betrusted.io/xous-book/ch04-04-writing-cs-peripherals.html https://github.com/renode/renode-infrastructure/blob/master/src/Emulator/Peripherals/Peripherals/I2C/SHT21.cs

Success of this ticket will be in the form of a C# file that is able to accurately represent the internal behavior of the LV Load Switch IC, and being able to actually include it in our Renode emulation. I think that you can also leverage Renode environments to provide mock data but tbh I have no idea how that would work.

Note that the location of these mock peripherals is under Test/renode/