Skip to content
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

Kwabena/fix portenta ethernet dma buffer #131

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ports/stm32/boards/ARDUINO_PORTENTA_H7/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,8 @@ extern struct _spi_bdev_t spi_bdev;
#define MICROPY_HW_ETH_RMII_TXD0 (pin_G13)
#define MICROPY_HW_ETH_RMII_TXD1 (pin_G12)

#define MICROPY_HW_ETH_DMA_ATTR_SECTION __attribute__((section(".dma_buffer")))

#define MICROPY_HW_USB_VID 0x2341
#define MICROPY_HW_USB_PID 0x045B
#define MICROPY_HW_USB_PID_CDC_MSC (MICROPY_HW_USB_PID)
Expand Down
4 changes: 4 additions & 0 deletions ports/stm32/eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ typedef struct _eth_t {
int16_t (*phy_get_link_status)(uint32_t phy_addr);
} eth_t;

#ifdef MICROPY_HW_ETH_DMA_ATTR_SECTION
static eth_dma_t eth_dma __attribute__((aligned(16384))) MICROPY_HW_ETH_DMA_ATTR_SECTION;
#else
static eth_dma_t eth_dma __attribute__((aligned(16384)));
#endif

eth_t eth_instance;

Expand Down
Loading