Embedded System Design 2 - Project
Todo List
File ADXL362.c
Future improvements:
  • Check configurations by reading the registers again and return true/false when the registers have/don't have the correct values.
  • Enable wake-up mode (writeADXL(ADXL_REG_POWER_CTL, 0b00001000); // 5th bit)
  • Enable loop mode (with act/inact time registers?) so interrupts don't need to be acknowledged by host (writeADXL(ADXL_REG_ACT_INACT_CTL, 0b00110000);)
File cable.c
Future improvements:
  • Use two parallel lines who normally aren't connected and use an interrupt to detect if they broke and get connected through the water.
File dbprint.c
Future improvements:
  • Fix dbSet_TXbuffer and also add more functionality to print numbers, ...
  • Separate back-end <-> MCU specific code
File delay.c
Future improvements:
  • Split definition to use the ULFRCO for the delay and sleep method separately.
    • This isn't that easy because of the common INIT method.
    • Don't forget to update documentation.h if this functionality is changed.
  • Enable/disable clock functionality? (see comments using //)
File lora_wrappers.c
Future improvements:
  • Save LoRaWAN settings during INIT before calling disableLoRaWAN?
    • Should be possible in ABP (saving to EEPROM? saveMAC?) See reference manual!
    • Update code where initLoRaWAN and other methods are called.
  • Fix sleepLoRaWAN and wakeLoRaWAN methods.
    • First separate ULFRCO definition in delay.c
File main.c

Optimalisations:

  • Change LoRaWAN Spreading Factor and send power, and check the effect on the power usage.
  • Add some time to the while increment escape counters?
  • Check power usage effect of disabling PM_SENS_EXT.
  • Check difference between absolute/referenced mode for the accelerometer.
  • Change mode to release.

Future improvements:

  • Use IAR toolchain instead of GCC, see section Optimizing code in documentation.h
  • Sleep for some time in while loops instead of just incrementing the escape-counter.
    • First separate ULFRCO definition in `delay.c
  • Try to shorten delays (for example: 40 ms power-up time for the RN2483...)
  • Fix sleepLoRaWAN and wakeLoRaWAN functionality (also see lora_wrappers.c).
File util.c
Future improvements:
  • Only send a maximum amount of errors to the could using LoRaWAN according to a defined value.
    • Reset the counter in the MEASURE/SEND state?
  • Go back to INIT state on an error call?
    • GOTO is supported in C but is dangerous to use (nested loops, ...)
    • Check if the clock functionality doesn't break when this is implemented ...