RobertK66 / obc_1769_core

Implements hardware abstractions and Layer2(3) modules for usage of the OBC hardware in cubesat projects
GNU General Public License v3.0
1 stars 1 forks source link

Feature/psu integration #48

Closed kodsurf closed 1 year ago

kodsurf commented 1 year ago

Arduino code that sends out I2C request to PSU can be found here

https://github.com/RobertK66/obc_1769_core/blob/STP/utilities/PSU_Arduino/arduino_request_from_PSU/arduino_request_from_PSU.ino

Arduino code was provided by PSU team and Andreas Stren.

In a branch feature/psu_integration I were able to reproduce same result from OBC.

How to :

When "k" command is sent to debug UART

image is executed

Within a function two i2c jobs are added

1) First one transmits single byte with starting register index at PSU datavector

it is important here to leave rx_size =0 for pure transmit . image

2) For the second job which is "pure read request" we must keep tx_size and tx_data empty !

image

The amount of received bytes to be defined in rx_size

PSU replies with bytes starting from index that we provided and untill the last byte of datavector (86)

Here I hardcoded that we will receive 3 bytes (just for testing) image

With "k"command t - PSU replies with full message. But OBC captures only 3 as we hardcoded it.

image

RobertK66 commented 1 year ago

Lets wait for the inputs of @AndyFHWN here.