Skip to content

Conversation

@hansbinderup
Copy link

This commit adds mspm0 hardware specific spi driver.

Only controller mode has been tested and therefore peripheral mode is not yet a valid config.
The driver has been tested with physical hardware using a spi_nor jedec flash.

Note: Requires msp-ti/hal_ti#2 (not added to west.yml as it's currently pointing at another pull towards upstream).

@msp-ti not sure if you want this PR targeted this branch. I can change target if you prefer it on another branch. I just don't have write permission to the repo so had to pick a branch.

JFMSP and others added 8 commits April 16, 2024 12:13
For CI tests to pass, we point to our changes for MSPM0 in hal_ti

Signed-off-by: Jackson Farley <[email protected]>
added necessary soc files for TI MSPM0 family

Signed-off-by: Jackson Farley <[email protected]>
added TI MSPM0 device support to the devicetree

Signed-off-by: Jackson Farley <[email protected]>
added pinctrl driver support for MSPM0 Family

Signed-off-by: Jackson Farley <[email protected]>
Added GPIO driver support for TI MSPM0 family

Signed-off-by: Jackson Farley <[email protected]>
added the Serial (uart) driver for MSPM0 family

Signed-off-by: Jackson Farley <[email protected]>
Added TI LP_MSPM0G3507 board for MSPM0 Family

Signed-off-by: Jackson Farley <[email protected]>
This commit adds mspm0 hardware specific spi driver.

Only controller mode has been tested and therefore peripheral mode is not
yet a valid config.
The driver has been tested with physical hardware using a spi_nor jedec
flash.

Signed-off-by: Hans Binderup <[email protected]>
@msp-ti msp-ti force-pushed the mspm0_upstream branch 2 times, most recently from a626b1d to 979c943 Compare April 23, 2024 14:54
@msp-ti msp-ti deleted the branch msp-ti:mspm0_upstream October 8, 2024 21:29
@msp-ti msp-ti closed this Oct 8, 2024
@msp-ti msp-ti reopened this Oct 8, 2024
@msp-ti
Copy link
Owner

msp-ti commented Oct 8, 2024

Thank you for these updates. I'll look to include them and credit them on top of our additional SPI work.

@msp-ti msp-ti assigned msp-ti and JFMSP and unassigned msp-ti Oct 8, 2024
@msp-ti msp-ti force-pushed the mspm0_upstream branch 8 times, most recently from fef4852 to 7c960e4 Compare October 11, 2024 21:16
@msp-ti msp-ti force-pushed the mspm0_upstream branch 3 times, most recently from cd8d132 to 6ac0eae Compare November 2, 2024 22:24
msp-ti pushed a commit that referenced this pull request Nov 2, 2024
hci_packet_complete(buf, buf_size) should check whether buf_size is
enough.
For instance, hci_packet_complete can receive buf with buf_size 1,
leading to the buffer overflow in cmd->param_len, which is buf[3].
This can happen when rx_thread() receives two frames in 512 bytes
and the first frame size is 511. Then, rx_thread() will call
hci_packet_complete() with 1.

==5==ERROR: AddressSanitizer: global-buffer-overflow on address
0x000000ad81c2 at pc 0x0000005279b3 bp 0x7fffe74f5b70 sp 0x7fffe74f5b68

READ of size 2 at 0x000000ad81c2 thread T6
    #0 0x5279b2  (/root/zephyr.exe+0x5279b2)
    #1 0x4d697d  (/root/zephyr.exe+0x4d697d)
    #2 0x7ffff60e5daa  (/lib/x86_64-linux-gnu/libc.so.6+0x89daa)
(BuildId: 2e01923fea4ad9f7fa50fe24e0f3385a45a6cd1c)

0x000000ad81c2 is located 2 bytes to the right of global variable
'rx_thread.frame' defined in 'zephyr/drivers/bluetooth/hci/userchan.c'
(0xad7fc0) of size 512
SUMMARY: AddressSanitizer: global-buffer-overflow
(/root/zephyr.exe+0x5279b2)
Thread T6 created by T2 here:
    #0 0x48c17c  (/root/zephyr.exe+0x48c17c)
    #1 0x530192  (/root/zephyr.exe+0x530192)
    #2 0x4dcc22  (/root/zephyr.exe+0x4dcc22)

Thread T2 created by T1 here:
    #0 0x48c17c  (/root/zephyr.exe+0x48c17c)
    #1 0x530192  (/root/zephyr.exe+0x530192)
    #2 0x4dcc22  (/root/zephyr.exe+0x4dcc22)

Thread T1 created by T0 here:
    #0 0x48c17c  (/root/zephyr.exe+0x48c17c)
    #1 0x52f36c  (/root/zephyr.exe+0x52f36c)
    #2 0x5371dc  (/root/zephyr.exe+0x5371dc)
    #3 0x5312a6  (/root/zephyr.exe+0x5312a6)
    #4 0x52ed7b  (/root/zephyr.exe+0x52ed7b)
    #5 0x52eddd  (/root/zephyr.exe+0x52eddd)
    #6 0x7ffff6083c89  (/lib/x86_64-linux-gnu/libc.so.6+0x27c89)
(BuildId: 2e01923fea4ad9f7fa50fe24e0f3385a45a6cd1c)

==5==ABORTING

Signed-off-by: Sungwoo Kim <[email protected]>
@msp-ti msp-ti force-pushed the mspm0_upstream branch 4 times, most recently from f3123b1 to f81cd5b Compare November 9, 2024 17:59
@msp-ti msp-ti force-pushed the mspm0_upstream branch 2 times, most recently from 87e5b26 to c235b9f Compare November 13, 2024 02:45
@msp-ti msp-ti force-pushed the mspm0_upstream branch 6 times, most recently from 861c5da to d4b42c4 Compare December 9, 2024 22:22
@JFMSP JFMSP force-pushed the mspm0_upstream branch 2 times, most recently from 8d72876 to d0c9952 Compare January 21, 2025 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants