Skip to content

I2S - support for 64 bit setBitsPerSample() -- TLV320ADC5140 #1253

Answered by johnofleek
johnofleek asked this question in Q&A
Discussion options

You must be logged in to vote

I'm learning but nowhere up to speed with RP2040 pio programming - many thanks for all your help and patience.

Suggested changes does create the correct number of frame bits - 64 Left and 64 Right

pio_i2s.pio

static inline void pio_i2s_in64_program_init(PIO pio, uint sm, uint offset, uint data_pin, uint clock_pin_base, uint bits) {
    pio_gpio_init(pio, data_pin);
    pio_gpio_init(pio, clock_pin_base);
    pio_gpio_init(pio, clock_pin_base + 1);
    pio_sm_config sm_config = pio_i2s_in_program_get_default_config(offset);
    sm_config_set_in_pins(&sm_config, data_pin);
    sm_config_set_sideset_pins(&sm_config, clock_pin_base);
    sm_config_set_in_shift(&sm_config, false, true, 32); //…

Replies: 4 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@earlephilhower
Comment options

Comment options

You must be logged in to vote
1 reply
@earlephilhower
Comment options

Comment options

You must be logged in to vote
7 replies
@johnofleek
Comment options

@earlephilhower
Comment options

@johnofleek
Comment options

@earlephilhower
Comment options

@johnofleek
Comment options

Answer selected by johnofleek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants