Peripheral Driver Library's audio signal acquisition source code

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello everyone,

   

I have a FM4-176L-S6E2CC-ETH - ARM® Cortex®-M4 MCU Starter Kit and I really need to acquire the audio signal using the line-in jack, which is featured on the Starter Kit. However, the source code for that function is not provided in the Peripheral Driver Library. Please share the source code if you happen to have it. Your help is greatly appreciated!

0 Likes
1 Solution
AchimE_41
Employee
Employee
10 sign-ins 5 sign-ins First comment on KBA

On the starter kit there are a 512kiB SRAM connected to the external bus interface (EXTIF) of the MCU as well as an external 4MiB Flash connected to the Quad SPI interface. For the correct pin-out please refer to the schematic of the board.

   

 

   

In the PDL there is a driver for the 8MiB version of the Flash located in "2.1.0\utilities\qspi_flash\flashS25FL164K.*" that can be modified for the smaller version. (probably the driver works out of the box, haven't checked that)

   

Unfortunately I could not find an example for the SRAM at the moment. But the setup isn't that complicated.

View solution in original post

0 Likes
6 Replies
AchimE_41
Employee
Employee
10 sign-ins 5 sign-ins First comment on KBA

Hi,

   

 

   

Please have a look at following example.

   

http://www.cypress.com/documentation/software-and-drivers/s6e2cc-i2s-realtime-audio-equalizer

   

It is an equalizer that uses the Line-In input to capture audio and playback the processed signal on the headphone output.

   

 

   

Unfortunately it is a bit older and does not use the PDL. But it should be a good starting point.

   

 

   

kind regards,

   

Achim

0 Likes
Anonymous
Not applicable

Thank you very much for your reply Achim! I have some more questions: Is there an external memory on the Starter Kit? If there is one then how can I access to it? Is there any example for that? Thank you very much in advance!

   

Best regards,

   

Khang Nguyen

0 Likes
AchimE_41
Employee
Employee
10 sign-ins 5 sign-ins First comment on KBA

On the starter kit there are a 512kiB SRAM connected to the external bus interface (EXTIF) of the MCU as well as an external 4MiB Flash connected to the Quad SPI interface. For the correct pin-out please refer to the schematic of the board.

   

 

   

In the PDL there is a driver for the 8MiB version of the Flash located in "2.1.0\utilities\qspi_flash\flashS25FL164K.*" that can be modified for the smaller version. (probably the driver works out of the box, haven't checked that)

   

Unfortunately I could not find an example for the SRAM at the moment. But the setup isn't that complicated.

0 Likes
Anonymous
Not applicable

Hello Achim,

   

Could you please provide me the information related to these variables of the Flash's driver:

   
        
  • u8DeviceNr - Chip select number: I could not find where it is mentioned.
  •     
  • The HS-SPI module instance : how should I define it for my Starter Kit?
  •     
  • The addresses of the serial flash: are these defined in any files?
  •    
   

Thank you very much in advance! Have a nice day!

   

Best regards,

   

Khang Nguyen

0 Likes
AchimE_41
Employee
Employee
10 sign-ins 5 sign-ins First comment on KBA

1. The Chip select can be found in the kits schematics: http://www.cypress.com/file/290921/download  -> Chip Select 0

   

 

   

2. GPIO configuration can be done with following macros:

   

SetPinFunc_Q_CS0_0();

   

SetPinFunc_Q_IO0_0();

   

SetPinFunc_Q_IO1_0();

   

SetPinFunc_Q_IO2_0();

   

SetPinFunc_Q_IO3_0();

   

SetPinFunc_Q_SCK_0(); 

   

 

   

For the HSSPI configuration I don't have the correct settings. I'll try to figure it out within the next days.

   

 

   

3. The Addresses are passed to the functions as variables, no need to define anything.

0 Likes
Anonymous
Not applicable

Dear Achim,

   

In additional to the configuration of the HSSPI device, could you also provide the suitable configuration for the external device in the stc_hsspi_ext_device_config_t structure? Thank you very much in advance!

0 Likes