Open mablem8 opened 1 year ago
HSE clock initialization function changes are :
Issue link : https://github.com/CMUAbstract/tab/issues/2#issue-1574697830 Commit HASH link : [56e88fa](https://github.com/CMUAbstract/tab/commit/56e88fa0ffe3cd95ebe8d8c514389492a840576d)
Commit 56e88fa0ffe3cd95ebe8d8c514389492a840576d addresses this issue by
However, 56e88fa0ffe3cd95ebe8d8c514389492a840576d introduces extraneous code in cdh_monolithic.c from line 28 through line 52. While this code may be useful for testing, it cannot be present in a TAB example program.
Add the HSE clock initialization function header, the HSE clock initialization function implementation, and the use of the HSE clock initialization function to a commit in the sprint-1_alok
branch. Omit the superfluous code. Then post a link to the new commit as a comment in this issue thread.
Commit 76196ee fixes issue-2
The changes look good, however when I test the commit with tx_example.py the program hangs.
Could you post the terminal output here once you've confirmed that the changes work on your end?
Commit ccdb3dd fixes issue related to - no response to TAB commands
HSE clock test results : HSE_clock_initialization_test_result
I see no change in test behavior on my end using the following commands:
cd c-examples/cdh-monolithic/
cd ../scripts/
source sourcefile.txt
cd ../cdh-monolithic/
make
st-flash write cdh-monolithic.bin 0x08000000
cd ../../python-examples/tx/
source ../p3-env/bin/activate
python3 tx_example.py /dev/ttyUSB0
The expected output is a sequence of commands and replies. Here are the results from the sprint-2
branch:
txcmd: common_ack hw_id:0x1234 msg_id:0x0000 src:gnd dst:cdh
reply: common_ack hw_id:0x1234 msg_id:0x0000 src:cdh dst:gnd
txcmd: common_nack hw_id:0x1234 msg_id:0x0001 src:gnd dst:cdh
reply: common_nack hw_id:0x1234 msg_id:0x0001 src:cdh dst:gnd
txcmd: common_debug hw_id:0x1234 msg_id:0x0002 src:gnd dst:cdh "Hello, world!"
reply: common_debug hw_id:0x1234 msg_id:0x0002 src:cdh dst:gnd "Hello, world!"
txcmd: common_data hw_id:0x1234 msg_id:0x0003 src:gnd dst:cdh 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b
reply: common_ack hw_id:0x1234 msg_id:0x0003 src:cdh dst:gnd
txcmd: common_data hw_id:0x1234 msg_id:0x0004 src:gnd dst:cdh 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x0a 0x09 0x0b
reply: common_nack hw_id:0x1234 msg_id:0x0004 src:cdh dst:gnd
The ccdb3ddace33c206c94d8b9e208afea33f7bda4f commit hangs without a reply to the first command.
In future posts, include code snippets inside the comment and embed any images too; that way, they can be viewed directly instead of clicking through to a PDF.
When I compile the sprint 5 commit (f9530b2db5faf7fb95218ce40776bad08ef6a929) and flash it to the CDH MCU, LED1 lights up and LED2 stays unlit after powering the board. When I test the board with the test script, all commands receive the expected reply.
When I compile commit 2cb94941ec4cdbc35b01dcf37bcc866aeec4f5bb and flash it to the CDH MCU, neither of the LEDs light up after powering the board. When I test the board with the test script, I don’t receive any replies.
Because the init_leds
function is called directly after the init_clock_hse
function, and because the LEDs don't light up after flashing the HSE version of the program to the MCU, it seems that something is going wrong before the init_leds
function is called.
What behavior are you observing on your board?
Updated commit for fixing missing upload in ff068cd addresses HSE clock function issue.
Adding the HSE clock initialization function implementation in cdh.c
HSE clock initialization function call cdh_monolithic.c
In cdh.h, add the function
void init_clock_hse(void);
.In cdh.c, add the function implementation.
Test the cdh_monolithic.c program after replacing
init_clock();
withinit_clock_hse();
.