This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Do we need pull ups in SPI with SD card

1. I was reading MSP430 interface with SD card & found the schematic below. Do we need pull up on MOSI & MIS0 lines. Won't they slow down the speed ot they are optional.

2. Is it necessary to pull up 9 pin & gnd 8 pin

3. I am working on 4GB class 4 SD card. Is the entire range is writable or some is protected.

If I chose 512 bytes sector, then no of blocks are = 4GB/512 bytes. Is it??????? 

 

  • I am using SPI with a FLASH device and I am not using any PullUps. I think SPI never needs those pullups, because is it able to set and reset the lines internally.

    Perhaps they switched it up with the I2C, because I2C needs those pullups on the signal lines, because it cannot provide a High logic itself.

    Anyway if you are not sure and have the space available on your PCB I would plan them in , since you still can leave them unpopulated if not needed.

  • The pullups make sure that SD card won't get erroneously into a wrong state when the MSP isn't ready and all its pins (especially SCK and SS) are high-impedance inputs. But personally, I never had pullups and did not discover any problems.

    having the pads and leave them unpopulated until needed is surely a good advice.

    However, I use a small resistor (33 Ohms) in series to VCC, to limit the inrush current when the card is inserted (I had it sometimes resetting my processor, and a resistor is cheaper than an additional larger capacitor for stabilizing)

  • The EXP430F5529 User Experience code, which interfaces to an SD card on the board, configures the internal resistor to pull-up on MISO (SOMI for TI folks).   I found a rationale for this at http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=113786.  In this case it might be important since there are other peripherals on the same bus.

    What I remain unconvinced of is whether the internal resistor works when the pin is configured to its peripheral function, and more so when it's configured for peripheral but the peripheral is in SWRST.  At any rate, I haven't proven that doing it causes problems, though I'm still trying to track down a PMMKEY reset when I write data to the card.  (I did increase VCORE, though from the schematics and its ineffectiveness I'm not convinced it's relevant.)

  • Peter Bigot said:
    What I remain unconvinced of is whether the internal resistor works when the pin is configured to its peripheral function, and more so when it's configured for peripheral but the peripheral is in SWRST.

    The pullup is independent of the peripherals internal functionality, so it works ig the USCI is in SWRST.
    However, on some MSPs, the pullups are disabled for pins that are in output direction (makign it useless for I2C, but the pullups are too weak for I2C anyway)  and for some peripherals, the function is disabled if module option is selected.

    The function logic of the pullups is shopwn in detail in the port pin schematics found on the MSPs datasheet.

    On the F4429, Port 3.3/3.4, the pullups are controlled by (P3REN.x & !DIR.x), where DIR.x is either P3DIR.x or from module. Directionof th epullup is controlled by P2OUT.x.
    This leaves indeed some uncertainty about the state of the module direction signal during SWRST. The obvious assumption is input direction while the peripheral is in reset state, but indeed, there is no proof. But even if it shuld be output, deativating the pullup, then the pin would be actively driven and overriding the pullup anyway.

  • Hi,

    I am using Class 4 SD card. What is the minimum SPI freq I have to select. I read that minimum speed should be 4MB/sec. So what should be freq according to this & what is max freq I can achieve with Class 4 Sd card.

    I am using Kingston SDHc, 4gb, c4 card.

  • Aamir Ali said:
    What is the minimum SPI freq I have to select

    SPI is synchronous, so there is no minimum frequency. The master (you) provides the clock signal. However, some devices may have a timeout. I don't know for SD cards.

    The maximum frequency on initialization is 400kHz. After initializin ghte card and reading the card specific data, you may go up to the maximum frequency specified in teh card specific data register. Well, for serial/SPI access, all cards support up to 25MHz, which is also the maximum you can achieve with 25MHz MSP and USCI module, so it's fully your choice. Only for parallel mode, maximum max differ, but this mode makes no sense for MSP at all, as you cannot do two 4-bit transfers by software in less than 8 MCLK cycles, so SPI mode is faster and easier.

**Attention** This is a public forum