SAI Demo Program mis-detected SD Card

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SAI Demo Program mis-detected SD Card

ソリューションへジャンプ
987件の閲覧回数
scott1
Contributor I

Hello folks,

I'm experimenting with the sai demo application (sai.c) on a FRDM-K66F eval board. If I execute the program with no SD card inserted, the program falsely detects an SD card and launches in an SD card init, which obviously fails. Here's the output of the application:

[MCUXpresso Semihosting Telnet console for 'frdmk66f_sai LinkServer Debug' started on port 55837 @ 127.0.0.1]
SAI Demo started!

Please insert a card into board.

Card inserted.   <--- ACTUALLY NO CARD IS PHYSICALLY PRESENT


Make file system......The time may be long if the card capacity is big.
Make file system failed.
SDCARD init failed !  <--- NOT SURPRISING BECAUSE NO CARD IS PRESENT

Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
4. Quit

Has anyone seen this behaviour? I've tested with 2 separate eval board, same behaviour.

SDK: 2.7.0

IDE: 11.1.1

Thanks for any tips.

Scott

0 件の賞賛
返信
1 解決策
903件の閲覧回数
FelipeGarcia
NXP Employee
NXP Employee

Hello Scott,

 

I am sorry for the late reply. I have reproduced your issue on my board. This is because there is a mistake on the configuration of this pin. As you can see in the following snippet, PTD10 shorts with VDD when card is inserted.

pastedImage_2.png

However, you will see that in pin_mux.c file the pin has pull-up resistor activated. That is the reason why it detects the card as inserted even if it's not. Please change the configuration as below.

const port_pin_config_t portd10_pinB3_config = {/* Internal pull-up resistor is enabled */
                                kPORT_PullDown,
                                /* Fast slew rate is configured */
                                kPORT_FastSlewRate,
                                /* Passive filter is disabled */
                                kPORT_PassiveFilterDisable,
                                /* Open drain is disabled */
                                kPORT_OpenDrainDisable,
                                /* Low drive strength is configured */
                                kPORT_LowDriveStrength,
                                /* Pin is configured as PTD10 */
                                kPORT_MuxAsGpio,
                                /* Pin Control Register fields [15:0] are not locked */
                                kPORT_UnlockRegister};
/* PORTD10 (pin B3) is configured as PTD10 */
PORT_SetPinConfig(PORTD, 10U, &portd10_pinB3_config);

I hope it helps!

Have a great day,

Felipe

-------------------------------------------------------------------------------

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored

Please open a new thread and refer to the closed one, if you have a related question at a later point in time

------------------------------------------------------------------------------ 

元の投稿で解決策を見る

2 返答(返信)
903件の閲覧回数
scott1
Contributor I

Hey Felipe,

Sorry it has taken me so long to respond, I have been dragged off to help out on another project, but I did manage to test your fix just now. It works. Thank you very much. I still have the investigation regarding the 48KHz/24-bit issue on my todo list, but it may be a little time before I have an opportunity to dig back in. Meanwhile, if you are looking into the issue, please keep me updated. Thank you again.

Scott

0 件の賞賛
返信
904件の閲覧回数
FelipeGarcia
NXP Employee
NXP Employee

Hello Scott,

 

I am sorry for the late reply. I have reproduced your issue on my board. This is because there is a mistake on the configuration of this pin. As you can see in the following snippet, PTD10 shorts with VDD when card is inserted.

pastedImage_2.png

However, you will see that in pin_mux.c file the pin has pull-up resistor activated. That is the reason why it detects the card as inserted even if it's not. Please change the configuration as below.

const port_pin_config_t portd10_pinB3_config = {/* Internal pull-up resistor is enabled */
                                kPORT_PullDown,
                                /* Fast slew rate is configured */
                                kPORT_FastSlewRate,
                                /* Passive filter is disabled */
                                kPORT_PassiveFilterDisable,
                                /* Open drain is disabled */
                                kPORT_OpenDrainDisable,
                                /* Low drive strength is configured */
                                kPORT_LowDriveStrength,
                                /* Pin is configured as PTD10 */
                                kPORT_MuxAsGpio,
                                /* Pin Control Register fields [15:0] are not locked */
                                kPORT_UnlockRegister};
/* PORTD10 (pin B3) is configured as PTD10 */
PORT_SetPinConfig(PORTD, 10U, &portd10_pinB3_config);

I hope it helps!

Have a great day,

Felipe

-------------------------------------------------------------------------------

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored

Please open a new thread and refer to the closed one, if you have a related question at a later point in time

------------------------------------------------------------------------------