question mark
This commit is contained in:
@@ -10,6 +10,7 @@ fw for a ch32v203 node w/ w5500 ethernet
|
||||
- With a 1s interval it works
|
||||
- [Disabling SPI DMA](https://git.hye.su/mira/ch32-node/src/branch/master/src/w5500.c#L62) solves it (just commenting out `reg_wizchip_spiburst_cbfunc`), so it's most likely DMA related?
|
||||
- SPI DMA only works with [prescalers](https://git.hye.su/mira/ch32-node/src/branch/master/src/spi_dma.c#L140) 8 and 64?
|
||||
- Also, for some reason it needs a ~50ms delay before configuring w5500 when compiled **with** `-O0`, not needed with `-Os`...
|
||||
|
||||
TODO: LA?...
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ board = genericCH32V203C8T6
|
||||
framework = ch32v003fun
|
||||
upload_protocol = wlink # isp, minichlink, wch-link, wlink
|
||||
build_unflags = -march=rv32imacxw
|
||||
build_flags = -march=rv32imac -Wall -Wextra
|
||||
build_flags = -march=rv32imac_zicsr -Wall -Wextra
|
||||
debug_build_flags = -O0 -ggdb3 -g3
|
||||
|
||||
[env:local]
|
||||
platform_packages =
|
||||
|
||||
@@ -46,6 +46,8 @@ void message_arrived(MessageData* md) {
|
||||
|
||||
int main(void) {
|
||||
init_system();
|
||||
Delay_Ms(55);
|
||||
// DEBUG_PRINT("init_system() done\n");
|
||||
configure_network();
|
||||
|
||||
// TODO: enabling any kind of SysTick IRQ literally causes the socket to hang forever
|
||||
|
||||
@@ -59,7 +59,7 @@ void configure_network(void) {
|
||||
// Setup chip select and SPI callbacks
|
||||
reg_wizchip_cs_cbfunc(spi_select, spi_unselect);
|
||||
reg_wizchip_spi_cbfunc(spi_read_byte, spi_write_byte);
|
||||
// reg_wizchip_spiburst_cbfunc(spidma_read_buffer, spidma_write_buffer);
|
||||
reg_wizchip_spiburst_cbfunc(spidma_read_buffer, spidma_write_buffer);
|
||||
|
||||
uint8_t rx_tx_buff_sizes[] = {2, 2, 2, 2, 2, 2, 2, 2};
|
||||
wizchip_init(rx_tx_buff_sizes, rx_tx_buff_sizes);
|
||||
|
||||
Reference in New Issue
Block a user