Page 1 of 1

RTU Modbus bulk reads are not filling table

Posted: Mon Apr 06, 2026 3:14 pm
by abond_emporia
Hi,

I'm trying to use `mbc_master_send_request` to read more than one holding register at a time. The function returns without error and the signals look good on a scope, but only the first register is correctly being populated. The code that reads the registers something like this:

Code: Select all

#define MAX_NUM_HOLD_REG 5
static uint16_t regs[MAX_NUM_HOLD_REG];

esp_err_t read_hold_reg(void) {
    mb_param_request_t req = {
        .slave_addr = 1u,
        .command = 0x3u,
        .reg_start = 0,
        .reg_size = 5,
    };
    return mbc_master_send_request(&req, data);
}
I'm using ESP v4.2.3, and I can't find a way to initialize stop bits to 1 -- maybe it's a stop bits issue? Or is it that I'm not using a parameter table?

Thanks,
Andy