help regarding burst mode
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: help regarding burst mode
by lawrence WIZnet ·
Hi, @dadahar
W5500 default operation is burst mode. You do not need to consider to use it. Just you can read or write any size of buffer to load SPI communication. Address will be automatically increased to next address.
RE: help regarding burst mode
by dadahar ·
hi @lawrence ,
Thanks for the reply, i see that the default mode is in burst mode. I still have one question when i observe the data via a data analyzer i can see a delay of 2.5 us before each byte of transmission, can you assist me why is that happening? i have attached
the screenshot of the graph below.
Thank you
RE: RE: help regarding burst mode
by lawrence WIZnet ·
hi @dadahar
This is normal SPI master performance. SPI master controlled by MCU, normally MCU processor controls SPI master with delay (delay term is depending on mcu). If you do not want the delay, you need to use DMA. In DMA mode, you can remove the delay or control it.
It is not exactly the same condition, but could be helpful.
RE: help regarding burst mode
by dadahar ·
Hi @lawrence ,
This is helpful thanks, I am developing for nucleo 446re using mbed studio so can you help me how can i enable dma mode for spi for my setup and hardware. i have attached my code which i tried for dma mode can you look through it if that helps. Thanks a lot
code -
#include “mbed.h”
#include “w5500_spi.h”
#include “socket.h”
#include “header”
#define WIZCHIP W5500
#define WIZCHIP_IO_MODE WIZCHIP_IO_MODE_SPI_VDM
#define WAIT_TIME 1000 // msec
#define BUFFERLENGTH 12000
#define SOCKET_N 1
DigitalOut led1(LED1);
SPI spi1(D11, D12, D13);
DigitalOut cs(D10);
DigitalOut rst(D4);
DigitalOut toggle(D14);
wiz_NetInfo net_info = {
.mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef},
.ip = {192, 168, 1, 15},
.sn = {255, 255, 255, 0},
.gw = {192, 168, 1, 1},
.dns = {8, 8, 8, 8},
.dhcp = NETINFO_STATIC
};
wiz_PhyConf phyConf = {
.by = PHY_CONFBY_SW,
.mode = PHY_MODE_MANUAL,
.speed = PHY_SPEED_100,
.duplex = PHY_DUPLEX_FULL,
};
char buf[BUFFERLENGTH] = {0};
// DMA Configurations
#define DMA_CHANNEL_RX 2 // Define the DMA channel for SPI RX
#define DMA_CHANNEL_TX 3 // Define the DMA channel for SPI TX
#define DMA_TX_FLAG DMA_FLAG_TC_2 // Define the DMA TX flag
#define DMA_RX_FLAG DMA_FLAG_TC_3 // Define the DMA RX flag
DMA_HandleTypeDef hdma_rx;
DMA_HandleTypeDef hdma_tx;
void spiReadBurst(uint8_t* pBuf, uint16_t len) {
hdma_tx.Instance = DMA_INSTANCE_SPI_TX; // Set the DMA instance for SPI TX
hdma_tx.Init.Direction = DMA_MEMORY_TO_PERIPH;
hdma_tx.Init.PeriphInc = DMA_PINC_DISABLE;
hdma_tx.Init.MemInc = DMA_MINC_ENABLE;
hdma_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
hdma_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
hdma_tx.Init.Mode = DMA_NORMAL;
hdma_tx.Init.Priority = DMA_PRIORITY_HIGH;
}
int main() {
spi1.format(8, 0);
spi1.frequency(33000000);
}