Page 1 of 1

Taranis X9DP - SD Card issue

Posted: Tue Jun 04, 2019 8:48 pm
by andrewju
Hi All,

I got a second-hand Taranis with a dead MCU. I successfully replaced the MCU and the radio seem to work fine, except for the SD card. The radio doesn't see any files on the card... I rechecked the MCU soldering and also tried all the microSD cards I had at hand (8Gb and up) - no luck...

After a closer look inside the radio, I see the SD-card socket was already worked on. Someone probably replaced it before.
So now I can't say whether the problem is with MCU, with SD-card socket, or somewhere inbetween...

Any hints on how to check what is going on?

P.S. I see there are resistors near the SD card socket reading (right to left): R7, R5, R8, R9 and R10. They're all 50 Ohms, except for R5 which is 10k. Does that look Ok?

Re: Taranis X9DP - SD Card issue

Posted: Tue Jun 04, 2019 9:47 pm
by MikeB
Resistors are correct.
R5 goes to pin 2 of the SD card connector and 3.3V.
R7 also goes to pin 2.
R8 to pin 3.
R9 to pin 5.
R10 to pin 7.
pin 9 of the connector goes to CPU pin 56.

R7 to CPU pin 51
R9 to CPU pin 52
R10 to CPU pin 53
R8 to CPU pin 54

Mike

Re: Taranis X9DP - SD Card issue

Posted: Tue Jun 04, 2019 10:32 pm
by andrewju
Thanks, Mike!
These all seem correct on the radio I have...

Re: Taranis X9DP - SD Card issue

Posted: Wed Jun 05, 2019 12:31 am
by andrewju
I flashed the erskytx (latest beta).
The SD card stat screen shows:

Code: Select all

Present = YES
READY   0004   0001
        0064
Does this help in any way?

Re: Taranis X9DP - SD Card issue

Posted: Wed Jun 05, 2019 9:15 am
by MikeB
That all looks OK and the SD card is "mounted" and ready to work.
Please confirm the SD card is formatted to FAT32.

Try starting the radio in bootloader mode then connect to your PC and see if the SD card appears correctly on the PC.

Mike

Re: Taranis X9DP - SD Card issue

Posted: Wed Jun 05, 2019 9:48 am
by andrewju
Hmm... There's something strange...

I started the radio in Bootloader mode. But in this mode the radio is not detected as a USB device at all. Moreover, there seem to be no reaction on any button, and I can't even switch the radio off. I have to unplug the battery to shut it down.

If I plug a USB cable in with the radio switched OFF, it is detected as an STM32 BOOTLOADER. Nothing appears on the radio screen at this step. If I then switch the radio power ON, there is no change - still nothing on the screen, and no change in Device Manager.
If I first switch the radio ON (the regular way) and then connect it to the PC, it is detected as a Joystick.

Re: Taranis X9DP - SD Card issue

Posted: Wed Jun 05, 2019 9:55 am
by andrewju
Ahh, there is an issue!
If I start the radio in Bootloader mode with the SD card plugged in, the radio only shows 'Boot Loader'. No other words, no menu - nothing. And the radio is stuck in this state until a battery is disconnected.

If I start the radio in Bootloader mode without the SD card, it does start properly displaying 'Boot Loader V3.0Ready' and then a menu. In this case it is fully functional and does power off with the power switch - exactly as expected.

Re: Taranis X9DP - SD Card issue

Posted: Wed Jun 05, 2019 9:56 am
by jhsa
I smell a bad card there :) or not properly formatted. Can you try another one?? ;)

João

Re: Taranis X9DP - SD Card issue

Posted: Wed Jun 05, 2019 10:01 am
by kalle123
jhsa wrote: Wed Jun 05, 2019 9:56 am I smell a bad card there :) or not properly formatted. Can you try another one?? ;)

João
andrewju wrote: Tue Jun 04, 2019 8:48 pm ... and also tried all the microSD cards I had at hand (8Gb and up) - no luck...
:mrgreen:

Re: Taranis X9DP - SD Card issue

Posted: Wed Jun 05, 2019 10:18 am
by andrewju
I don't think it's a card's fault. Well, at least not only the card.

I just took a working SD card from my main radio (AR9x). With this card, the radio DOES start in Bootloader mode properly. But when connected to a PC, the drive appears and then immediately disappears in Windows Explorer a couple of times per second, or so... And it does this continuously while the radio is connected.

Ughhh... :(

Re: Taranis X9DP - SD Card issue

Posted: Wed Jun 05, 2019 12:42 pm
by andrewju
Any other ideas on what else to check?

Or is it time to go shopping for another MCU ?!
(the one I installed was absolutely new...)

Re: Taranis X9DP - SD Card issue

Posted: Wed Jun 05, 2019 1:36 pm
by MikeB
With the SD card from the AR9X, you get the bootloader to start. If you select "Flash Firmware", do you then get a list of files (assuming you have some ".bin" files is the "Firmware" directory)?

Mike

Re: Taranis X9DP - SD Card issue

Posted: Wed Jun 05, 2019 5:27 pm
by andrewju
Nope... with the 'working' card in, the radio stops responding as soon as I select any menu item ( Flash Firmware / Run App / Restore EEPROM ).
It just freezes and I have to pull out the battery again. :(

I can hook up a logic analyzer to see what is going on. Though, I'm not sure I will be able to interpret the data I will see...

Re: Taranis X9DP - SD Card issue

Posted: Wed Jun 05, 2019 6:36 pm
by MikeB
I suspect the same result but please try in maintenance mode of erskyTx (power on with trims apart).
I may be able to produce a test version for you that might help locate what is hanging!

Mike

Re: Taranis X9DP - SD Card issue

Posted: Wed Jun 05, 2019 7:10 pm
by andrewju
Hmm, in maintenance mode it's not hanging. It says "No files 1 " whenever I reach a step where a file needs to be selected.

Re: Taranis X9DP - SD Card issue

Posted: Wed Jun 05, 2019 7:28 pm
by andrewju
Mike,

I just hooked up a logic analyzer and I see some activity on pins 51, 52 and 53.
Pin 54 is always low, and pin 56 is always high.

Can you please explain which pin does what for the SD-card?
Pin 52 is probably the 'Clock'.
Is Pin 53 the 'Command' ?


EDIT:
Based on your comment above, I think it should be like this:
Pin 51 - CS
Pin 52 - CLK
Pin 53 - DAT0
Pin 54 - CMD
Pin 56 - Card detect ?

Re: Taranis X9DP - SD Card issue

Posted: Wed Jun 05, 2019 8:06 pm
by andrewju
This is what my logic analyzer tells me when I select 'Update Int. XJT' from the Maintenance menu:
x9dp_sdcard_issue_01.jpg

Re: Taranis X9DP - SD Card issue

Posted: Wed Jun 05, 2019 8:48 pm
by MikeB
(51) PB12 CS
(52) PB13 SCK
(53) PB14 MISO (data from card)
(54) PB15 MOSI (data to card)
(56) PD9 Card detect

Mike

Re: Taranis X9DP - SD Card issue

Posted: Wed Jun 05, 2019 9:04 pm
by andrewju
Yeah, that's how I figured it out...
Playing some more with a built-in decoder in the protocol analyzer (I use PulseView)... As soon as I tell the analyzer that MOSI (Pin54) is SD-card's "Command" line, the software starts to complain ("Decoder reported an error"). Perhaps, the request from the MCU comes somewhat corrupted.
That's more of a guess for now. And I have no idea why it happens...

Re: Taranis X9DP - SD Card issue

Posted: Wed Jun 05, 2019 11:04 pm
by andrewju
I think I found it... I took off the SD card socket and there was a lot of flux leftovers underneath... Some pins of the socket literally vanished when I touched them with a soldering iron. I guess the previous repair was done using some stronger acid instead of a soft flux, and the board wasn't properly cleaned afterwards. I cleaned everything with some alcohol and soldered a new socket in. A quick power up test welcomed me with a "Welcome to ersky9x" message!
Woooohooo! :)

Many thanks for all your help!!!

Re: Taranis X9DP - SD Card issue

Posted: Wed Jun 05, 2019 11:49 pm
by jhsa
Hey, good news, well done :)

João