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

issue on function i2s_init() #119

Open
TEFMA opened this issue Dec 23, 2020 · 0 comments
Open

issue on function i2s_init() #119

TEFMA opened this issue Dec 23, 2020 · 0 comments

Comments

@TEFMA
Copy link

TEFMA commented Dec 23, 2020

FEATURE REQUEST

Workarounds

Hi,
I want to read multi-channel I2S data for sound source localization. And I have 8 I2S microphones, using I2S0 on K210 to read them and met some issues:

  1. I am wondering how to set the parameter "uint32_t channel_mask" correctly? Which is in function "void i2s_init(i2s_device_number_t device_num, i2s_transmit_t rxtx_mode, uint32_t channel_mask)"

I already checked the params' brief introcduction of i2s_init():
/**

  • @brief I2s init
  • @param[in] device_num The device number
  • @param[in] rxtx_mode I2s work mode
  • @param[in] channel_mask Channel mask to which channel work

*/
It seems that the parameter "channel_mask" will decide which channel work.

  1. There is another function when K210 read the I2S signal, that is:
    /**
  • @brief I2S receive channel configure
  • @param[in] device_num The device number
  • @param[in] channel_num The channel number
  • @param[in] word_length The word length
  • @param[in] word_select_size The word select size
  • @param[in] trigger_level The trigger level
    */
    void i2s_rx_channel_config(i2s_device_number_t device_num,
    i2s_channel_num_t channel_num,
    i2s_word_length_t word_length,
    i2s_word_select_cycles_t word_select_size,
    i2s_fifo_threshold_t trigger_level,
    i2s_work_mode_t word_mode);

Note that this function has a parameter "i2s_channel_num_t channel_num", it also seems to be related to channel selection.

How to set the param "channel_mask" in function "i2s_init()" and the param "channel_num" in function "i2s_rx_channel_config"? many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant