-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 131: Add BNO055, RF430CL331H, update BME680, IS25xp #132
Conversation
…nd the IS25xP code
…e tested on Glaux revD and revE
@janithpet Can you please take a quick look at this PR. |
…used for averyone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed the removal of a lot of error handling in the flash driver. Is there a specific motivation behind this? (E.g., binary size.)
…reviewed code conventions for all sensors, compiled Glaux and Warp, tested BME680 with and without FLASH on Glaux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I made some suggestions related to code alignment.
Thanks! |
BNO055 and RF430CL331H source and header files and related code in boot.s and warp.h added.
Added new function to get the state of BME680
Added new functions to push and release IS25xp from a deep power-down state.
Pushed all components to sleep mode here
`#if (WARP_BUILD_ENABLE_GLAUX_VARIANT && WARP_BUILD_BOOT_TO_CSVSTREAM)
warpScaleSupplyVoltage(3300);
int timer = 0;
int rttKey = -1;
bool _originalWarpExtraQuietMode = gWarpExtraQuietMode;
gWarpExtraQuietMode = false;
releaseDeepPowerModeIS25xP();
warpPrint("Press any key to show menu...\n");
gWarpExtraQuietMode = _originalWarpExtraQuietMode;
while (rttKey < 0 && timer < kWarpCsvstreamMenuWaitTimeMilliSeconds)
{
rttKey = SEGGER_RTT_GetKey();
OSA_TimeDelay(1);
timer++;
}
if (rttKey < 0)
{
printBootSplash(gWarpCurrentSupplyVoltage, menuRegisterAddress, &powerManagerCallbackStructure);
#if (WARP_CSVSTREAM_TO_FLASH)
#else
printAllSensors(true /* printHeadersAndCalibration /, true / hexModeFlag /, 0 / menuDelayBetweenEachRun /, false / loopForever /);
#endif
}
#if (WARP_BUILD_ENABLE_DEVBME680)
warpPrint("About to configureSensorBME680() for sleep...\n");
status = configureSensorBME680( 0b00000000, / payloadCtrl_Hum: Sleep /
0b00000000, / payloadCtrl_Meas: No temperature samples, no pressure samples, sleep /
0b00001000 / payloadGas_0: Turn off heater /
);
if (status != kWarpStatusOK)
{
warpPrint("configureSensorBME680() failed...\n");
}
StateBME680();
#endif
#if (WARP_BUILD_ENABLE_DEVBNO055)
configureSensorRegisterBNO055(0x00, 0x02);
StateBNO055();
#endif
#if (WARP_BUILD_ENABLE_DEVRF430CL331H)
warpPrint("\r\n\tRF430CL control register status before going to standby mode\n");
StatusRF430CL331H();
configureSensorRegisterRF430CL331H(0x0040);
warpPrint("\r\n\tRF430CL control register status after going to standby mode\n");
StatusRF430CL331H();
#endif
#if (WARP_BUILD_ENABLE_DEVIS25xP)
/
* Put the Flash in deep power-down
*/
deepPowerModeIS25xP();
if (status != kWarpStatusOK)
{
warpPrint("\r\n\tError: communication failed");
}
warpPrint("\r\n\tFlash status after going into low power mode\n");
flashStatusIS25xP();
#endif
#endif`
******** bug ******************
To store correct BME680 results in the flash, temporarily comment sensorBitField for BNO055, RF430CL331H, and RV8803C7 in writeAllSensorsToFlash function in boot.c. Otherwise, it will store the wrong values. It's related to appendSensorDataBNO055, appendSensorDataRF430CL331H and appendSensorDataRV8803C7 functions.
`#if (WARP_BUILD_ENABLE_DEVBNO055)
numberOfConfigErrors += configureSensorRegisterBNO055(0x00, 0x02);
#endif
#if (WARP_BUILD_ENABLE_DEVRF430CL331H)
numberOfConfigErrors += configureSensorRegisterRF430CL331H(0x0040);
#endif
#if (WARP_BUILD_ENABLE_DEVRV8803C7)
#if (WARP_BUILD_ENABLE_DEVBNO055)
#if (WARP_BUILD_ENABLE_DEVRF430CL331H)
// sensorBitField = sensorBitField | kWarpFlashRV8803C7BitField;
#endif
// bytesWrittenIndex += appendSensorDataBNO055(flashWriteBuf + bytesWrittenIndex);
#endif
// bytesWrittenIndex += appendSensorDataRF430CL331H(flashWriteBuf + bytesWrittenIndex);
#endif`
Closes #131.