Home

UM-4 CubeSat Kit SD Card & EFFS

image

Contents

1. INCORPORATED User Manual 750 Naples Street San Francisco CA 94112 415 584 6360 http www pumpkininc com CubeSat Kit SD Card amp EFFS THIN User Manual HCC This manual describes how to use the EFFS THIN Embedded Flash File System Library for SD Cards with the CubeSat Kit Copyright Pumpkin Inc All rights reserved Specifications subject to change without notice last updated on Sep 16 2011 All trademarks mentioned herein are properties of their respective companies CUBE oS SAT KIT o User Manual CubeSat Kit SD Card amp EFFS THIN User Manual eeeeeeeeeeeeeeees 1 CHANGELOG oiiscsioroiimiesicareaii iara eA NR E EAE E EEEO A ENES 4 Introd ctoN issia a EE OR E E esa 5 Mn fOr ations seis E E EASA EE E E E E A E E E EN 5 SD Cards amp the CubeSat Kit eee ccccceecceseeseeeecesesseeeecesecseeeeeseecaaesaeseecaecaeeeeeeaecaaeenseaeenaeeaees 6 Supported tar tets ener a E E E T E 6 SD Card SPI Interface isccisc ceiesisscesehay uasenisscesadensudecahsa i aSa Re E AEE E ER SAR 6 The CubeSat Kit s SD Card Interface crica aa a i a 8 Practical Maximum Speed of the SPI Interface 0 ccecccescesecesecesecceeceseeeeeeseeeeaeenseens 11 Another High Speed SPI Interface Example ccccecccessseseeeseeeeeeeseeeeeeeeeeeeseeseesseeenaes 13 SD Card formatting ccccssccsaceisceasetestacieoedte coe cecued jad anaa a N o iaa e Er E a R N NS 14 SD Card compatibility ccccccccscssecsssce
2. internally with an argument of 100000 i e 100kHz This is the value of cSK_SD_INIT_SPEED 13 At the end of f_initvolume once all of the SD Card initialization is complete the SPI clock speed is raised by the EFFS THIN code via another internal call to spi_set_baudrate In the CubeSat Kit implementation the higher speed SPI baudrate is defined by cSkK_SD_RUN_SPEED and is normally 500kHz 4 TR Users who wish to access their SD Cards at different speeds after initialization can do so easily by calling the function spi_set_user_baudrate with the desired SPI clock as its argument in Hz as shown in Figure 11 below Note The resolution at which a particular SPI peripheral s clock can be set varies based on processor architecture Therefore there are real world limits on how accurately a desired SPI clock can be set via spi_set_user_baudrate Consult the appropriate datasheet s and the CubeSat Kit SPI driver source files for more information A complementary function spi_get_user_baudrate is also available It returns the desired user baud rate in Hz 5 12 f initvolume is part of the EFFS THIN source code Therefore CubeSat Kit users do not have source code access to it nor to any other EFFS THIN functions These functions are compiled into the EFFS THIN libraries that are supplied with the CubeSat Kit The only related functions that CubeSat Kit customers can view as source code are those ass
3. 30 30 34 33 31 35 35 ions 0000043155 Ox0080 20 20 43 75 72 72 65 6E 74 20 74 69 63 6B 73 34 Current ticks 0x0090 20 30 30 30 38 36 34 31 38 37 35 2E OD OA 49 74 0008641875 It 0x00A0 65 72 61 74 69 6F 6E 73 3A 20 30 30 30 30 30 34 erations 000004 0x0080 33 31 35 36 20 20 43 75 72 72 65 6E 74 20 74 69 3156 Current ti ox00CO 63 6B 73 3A 20 30 30 30 38 36 34 32 30 37 35 2E cks 0008642075 zil MOSIData miso Data Timina Bus LiveFiter Info Read SN 1095 570512 HW 1 00 FW 3 09 SPI _100ns EN Figure 3 SPI analyzer capture and analysis of SD Card signals running at 500kHz on CubeSat Kit hardware The CubeSat Kit s SD Card Interface In CubeSat Kit Rev C the interface was direct to the SD Card with pull up resistors and series current limiting resistors as shown in Figure 4 The pullup resistors are required by the SD Card specification The series resistors isolate the microcontroller bus from the SD Card when it was unpowered or powered but not selected via Cs_sD 7 VCC_CARD is under control of the microcontroller 8 UM 4 CubeSat Kit SD Card amp EFFS THIN User Manual User Manual UM 4 CubeSat Kit SD Card amp EFFS THIN User Manual mise cp H o J15 PAD we HEO J16 PAD rafal afro 420 317 PAD Figure 4 CubeSat Kit Rev C SD Card SPI interface Additionally resistor R59 guaranteed that no matter what happened on the microcontr
4. 5MHz FAT32 Kingston 4GB microSDHC yes 2 5MHz FAT32 Class 4 Patriot oad 4GB microSDHC yes 2 5MHz FAT32 Class 4 Wintek filemate 4GB microSDHC yes 2 5MHz FAT32 26 Table 5 SD Cards tested on the CubeSat Kit using EFFS THIN Note SDHC cards require a build of EFFS THIN that supports SHDC UM 4 CubeSat Kit SD Card amp EFFS THIN User Manual CUBE oo SAT SAT User Manual Frequently Asked Questions FAQ General Why can t change some of the EFFS THIN configuration options e g F_xxxx Those configuration options require recompiling the EFFS THIN source code in order to create a new linkable object module The CubeSat Kit provides precompiled EFFS THIN libraries no source code Therefore the only valid configuration options are the ones Pumpkin uses to generate the CubeSat Kit s EFFS THIN libraries None of the CubeSat Kit s EFFS THIN libraries have exactly the configuration s want need What can do You can request that Pumpkin create a library that has the configuration options you desire If approved we will add it to the precompiled libraries that are supplied as part of each CubeSat Kit EFFS THIN distribution Alternatively you can purchase an EFFS THIN source license from HCC Embedded would like to implement an extension to EFFS THIN like TMR Triple Majority Redundancy How can I do that The SPI level drivers are included as source code in
5. Rev D SD Card transfers at 1MHz LIN 1 Sr Q A ar 2 CELA WINI lear anial UM 4 CubeSat Kit SD Card amp EFFS THIN User Manual 13 WY SD Card formatting User Manual Note Of interest in Figure 8 is the clock synchronous noise on the m1so somi line after lt gt has gone inactive and the buffers u17 and u18 have been deselected This is due to coupling between the scLx driven for the final eight clock cycles shown and MISO MOSI signals not driven high impedance because u18 is off which travel together in close proximity on PCB itself SD Cards of up to 2GB capacity should be formatted as FAT FAT16 not FAT32 A precompiled library must be expressly built for FAT32 to support FAT32 FAT32 support requires additional memory A library built for FAT32 can also support FAT 16 SD Card compatibility 14 The CubeSat Kit s SD Card interface is electrically compatible with all SD Cards operating at vcc_caRD 3 3V miniSD Cards are 100 compatible with the CubeSat Kit They all support the SPI interface and are therefore compatible with the CubeSat Kit An SD to miniSD adapter must be used with the CubeSat Kit s SD Card socket microSD Cards are not necessarily compatible with the CubeSat Kit This is because the SPI interface is optional on microSD Cards Therefore the user must verify against a working SD Card whether a particular microSD Card works as well An SD to microSD adapter must be us
6. competently you must familiarize yourself with the included EFFS THIN documentation Selecting a Precompiled Library 18 The EFFS THIN supplied with the CubeSat Kit is supplied in a precompiled form no source code is included This is done to minimize the additional cost of the EFFS_ THIN software and to simplify the use of this capable software Libraries are compiled at Pumpkin with an eye for which types of libraries are most useful for CubeSat Kit users Some users e g those with MSP430 processors are likely to want the smallest possible library due to memory constraints Others might want the fastest or one with advanced features e g FAT32 support The CubeSat Kit EFFS THIN libraries are numbered for easy identification A brief descriptive overview of the currently available libraries is listed below in Table 3 It is beyond the scope of this document to explain the various features and build options of EFFS THIN To understand the build settings used to create each EFFS_ THIN library view the contents of the corresponding CubeSat Kit EFFS THIN configuration file csk_effs_thin N h UM 4 CubeSat kit SD Card amp EFFS THIN User Manual SAT KIT User Manual N Type Like Notes amp Typical Applications 1 file handle 4 SUPER 4 FAT16 only THIN basic functions included limited functionality via small RAM footprint 2 file handles 2 THIN 3 FAT12 FAT16 amp FAT32 nearly all functions in
7. registers were to change during an SPI transfer a conflict between P3 2 on the MSP430 and DO on the SD Card could arise possibly leading to the destruction of some circuitry due to excessive currents through the output stages CUBE KIT 10 User Manual With the Rev D circuitry the SD Card is completely isolated i e hi Z from the 10 3 0 bus signals that form the SPI interface to the SD Card whenever vcc_carp is off or 10 0 CS_SD is inactive Note In Rev D a smaller R59 is used to ensure no damage in the case of an output to output conflict between 10 2 and the MISO SOMI signal at U18 3 UM 4 CubeSat Kit SD Card amp EFFS THIN User Manual SAT Al KIT J User Manual Practical Maximum Speed of the SPI Interface SD Cards are rated at a minimum operating speed of 25MHz However the series resistor s in the CubeSat Kit s SPI interface to the SD Card limit the maximum possible operating speed to approximately 1MHz R59 330Q The effect of R59 on MISO SOMI is shown in Figure 6 below for scLK 1MHz Note that miso somt s rise and fall times are 30x longer than those of SCLK Note Key to signals in oscilloscope trace top to bottom CS_SD SCLK MOSI SIMO MISO SOMI Tek IND Acg Complete M Pos 1 340 05 MEASURE CH2 Rise Time B 000ns CH2 Fall Time 83ans CH4 Rise Time 280 0ns 7 CH4 Fall Time 3 ae 283 015 MATH Off Freq 4 CH1 2 00 CHe 2000Y MM 500ns CH4 2 064 CH3 200
8. value i e 1 2 that corresponds to the flavor of the EFFS THIN library you wish to use in your application For example if you want to the CubeSat Kit EFFS THIN library that supports up to three concurrently open file handles and nearly all of the THIN build options you would define CSK_EFFS_THIN_LIB 3 UM 4 CubeSat kit SD Card amp EFFS THIN User Manual SAT KIT J User Manual and apply it via your build environment s IDE to apply to the entire project Note The actual settings for each value N of CSK_EFFS_THIN_LIB can be viewed in the read only files csk_effs_thin N h located in Pumpkin CubeSatKit HCC Embedded EFFS THIN Src Calling the EFFS THIN API You must include the appropriate header in each c source file that makes calls to the EFFS THIN API include lt thin_usr h gt Then you can make calls to the EFFS THIN API e g include lt thin_usr h gt F_FILE file f_initvolume file f_open myfile txt a Figure 10 Example of EFFS THIN API calls in C will open a file called myfile txt in append mode on the CubeSat Kit s SD Card UM 4 CubeSat Kit SD Card amp EFFS THIN User Manual 21 CUBE oo SAT SAT User Manual Running the SPI Interface at Other Speeds 22 By default the EFFS THIN code initially queries the SD Card with the SPI clock speed set to 100kHz This happens during f_initvolume 2 when the EFFS THIN code calls spi_set_baudrate
9. CH4 200 30 Oct 03 12 53 lt 10H2 Figure 6 1MHz SPI interface signals with R59 3300 Changing R59 to 0Q results in much faster rise and fall times for MISO SOMI as shown in Figure 7 This shows that higher SPI interface speeds are possible with lower values of R59 See also Running the SPI Interface at Other Speeds below 9 1MHz was found empirically to be the maximum SPI interface speed for reliable operations with a SanDisk 512MB SD Card when driven by Pluggable Processor Module PPM D3 MSP430F2618 UM 4 CubeSat Kit SD Card amp EFFS THIN User Manual 11 CUBE KIT 12 User Manual Note The maximum SPI interface speed of many microcontrollers is often limited to an integer fraction of the microcontroller s CPU clock For example a 7 3728MHz MSP430F1611 has a maximum scLK speed of 2 458MHz Therefore for some PPMs it may not be worth changing R59 and the 500kHz default SD Card SPI interface speed may be adequate and safe for the application Tek alt Acg Complete M Pos 1 340 us MEASURE CH2 Rise Time c g Tons 2 CH2 Fall Time oor ins CH4 Rise Time 3 27 5ns7 CH4 Fall Time 3 4 754ns7 MATH Off Freq 4 CH1 2 004 CH2 2 00 MM 500ns CH4 2 084 CH3 2 00 CH4 2 00 30 Oct 09 14 14 lt 10Hz Figure 7 1MHz SPI interface signals with R59 0Q Note If your microcontroller has a dedicated mIs0 som1 pin that functions only as an input at all times or is internally current limite
10. Can I run multiple SD Cards in a CubeSat Kit Can I connect multiple processors to one or more SD Cards in a CubeSat Kit By default the CubeSat Kit s EFFS THIN libraries interface only to the SD Card that is on the CubeSat Kit Motherboard This is controlled by the SPI driver It is relatively simple to expand the driver to support two separate SD Cards from a single processor You could also run two processors each to its own card or you could even share a card across multiple processors All of this can be done by creating a purpose built SPI driver Licensing On what targets can I use applications built with the CubeSat Kit s EFFS THIN The EFFS THIN license that accompanies the CubeSat Kit permits you to use the EFFS THIN libraries to generate applications exclusively for the CubeSat Kit UM 4 CubeSat Kit SD Card amp EFFS THIN User Manual 29
11. D Card amp EFFS THIN User Manual 19 20 Add Include Paths User Manual CubeSat Kit EFFS THIN libraries follow the naming convention lib_effs_thin_ lt target gt lt options gt N 1lib and are located in Pumpkin CubeSatKit lt target gt Lib lt compiler gt Note CubeSat Kit libraries are peripheral independent and are therefore built for entire families of processors If your CubeSat Kit uses a Pumpkin supplied PPM then an appropriate library will be available If you have created your own PPM with a processor that is from the same family then the CubeSat Kit EFFS THIN library will probably work with it too In order for your application to build correctly certain files must be located during the C preprocessing stage Therefore add the following include paths to your project Pumpkin CubeSatKit HCC Embedded EFFS THIN Src Pumpkin CubeSatKit lt target gt Srce Note The EFFS THIN libraries are precompiled Therefore you cannot and must not make any changes to the EFFS THIN header files in the directories above or your program may not function correctly Don t forget to add an include path to your project s home directory as well Define the CSK_EFFS_THIN_LIB Symbol In order for your application to build correctly with an EFFS THIN library you must specify which precompiled EFFS THIN library you wish to use This is done via the cSK_EFFS_THIN_LIB symbol You define this symbol to be the integer
12. P710 MPLAB C30 sm coff N v3 2 3 Table 3 EFFS THIN library applications List of SPI Drivers Table 4 describes the available SPI drivers their intended processor targets and details of their implementations Intended CSK Name Notes Targets Uses SPIO wiNSS Runs at 500kHz 8051 effs_thin_mmc_drv_spi0 C8051F 120 No interrupts No DMA usaorsce User USARTOSH effs_thin_mmc_drv_us0 MSP430F 1611 No int t MSP430F1612 2 ANSTTUpIS MSP430 WO DMA Uses USCI_BO SPI offs thin mne dro et MSP430F2618 Runs at 500kHz No interrupts No DMA Uses SPI1 PIC24FJ256GA110 paa effs_thin_mmc_drv_spil PIC24FJ256GB210 G S dsPIC33FJ257GP710 No DMA 2 Table 4 SPI driver applications UM 4 CubeSat Kit SD Card amp EFFS THIN User Manual 25 CUBE oo SAT SAT SD Card Database User Manual Using a Rev D Development Board DB with PSPM B1 Pumpkin has tested the SD Cards listed in Table 5 for basic functionality Note The EFFS THIN configuration for each card may vary based on card requirements miniSD and microSD cards were tested using SD Card adapters Pl Mfgr Model Size Type Good fo d Format Notes Panasonic 32MB SD yes 2 5MHz FAT SanDisk 128MB miniSD yes 2 5MHz FAT Kingston 2GB SD yes 2 5MHz FAT32 Motorola 2GB microSD yes 2 5MHz FAT32 Patriot 2GB microSD yes 2 5MHz FAT32 Polaroid 4GB SDHC no 2 5MHz FAT32 by PNY SanDisk Extreme Ill 4GB SDHC yes 2
13. The argument is of type unsigned long UM 4 CubeSat Kit SD Card amp EFFS THIN User Manual 23 CUBE oo SAT SAT Examples of Higher SPI Interface Speeds 24 User Manual By using spi_set_user_baudrate SD Cards at the speeds shown in Table 2 below have been tested at Pumpkin and appear to operate properly Warning These setups have not been tested exhaustively and therefore no guarantee is made as to their suitability for any application Use at your own risk CSK SPI Clock Speed R59 Notes 2011 03 21 CSK DB Rev D 8051 12 25MHz 00 CSK PSPM B1 Rev A SYSCLK 24 5MHz SanDisk 128MB miniSD via adapter Table 2 Examples of higher SD Card speeds UM 4 CubeSat Kit SD Card amp EFFS THIN User Manual User Manual List of EFFS THIN Libraries Table 3 describes the available CubeSat Kit EFFS THIN libraries their intended processor targets and compatible compilers Intended CSK Name Notes Targets KC51 v8 8051 lib effs_thin_c8051 C8051F120 For Keil Gx51 v8 x xdata N RA430 v1 For Rowley lib_effs_thin_msp430 N Mer pores CW430 v1 4 aca MSP430F1611 Mera lib_effs_thin_msp430 N Mercere For Rowley RA430 v2 CW430 v2 0 lib_effs_thin_msp430x N MSP430F2618 MCC30 v3 For Microchip eee eee PIC24FJ256GA110 PIC24 lib_effs_thin_pic24 sm PIC24FJ256GB210 MPLAB C30 coff N v3 2 3 MCC30 v3 For Microchip dsPIC33 lib_effs_thin_dspic33 dsPIC33FJ257G
14. cluded 3 file handles 3 THIN 2 FAT12 FAT16 amp FAT32 nearly all functions included 1 file handle 4 SUPER 4 FAT16 only THIN no directory functions limited functionality via small RAM footprint Table 1 List of available CubeSat Kit EFFS THIN libraries Add csk_sd c Add your CubeSat Kit s csk_sd c to your project This source code module implements a simple API to control the SD Card and is used by the EFFS THIN SPI driver It can be found in Pumpkin CubeSatKit lt target gt Srce Add EFFS THIN SPI Driver Add the EFFS THIN SPI driver for your CubeSat Kit to your project The SPI driver is provided in source form c h CubeSat Kit EFFS THIN SPI drivers follow the naming convention ef fs_thin_mmc_drv_xxx c and are located in Pumpkin CubeSatKit lt target gt Srce Note CubeSat Kit EFFS THIN SPI drivers are peripheral dependent and are therefore built for a narrow range of processors that all have the same peripheral If an existing SPI driver does not match the peripherals on your processor for instance if you have designed your own PPM you can use the source code of the SPI driver as a basis for creating your own compatible SPI diver that can be linked in your application to the EFFS THIN library Add EFFS THIN Library Add the EFFS THIN library for your CubeSat Kit to your project The library is provided in object library form 1lib a hza etc UM 4 CubeSat Kit S
15. col This interface is connected to the CubeSat Kit Bus Connector Also starting with Rev C each CubeSat Kit is supplied with a variety of software components One of those components is a special library only version of HCC Embedded s http www hcc embedded com well regarded C language Embedded Flash File System EFFS called EFFS THIN Because it does not contain source code the version included with the CubeSat Kit is substantially less expensive than versions of EFFS THIN that include source code This thin build of EFFS is designed especially for small microcontrollers and is very well suited to use in the CubeSat Kit EFFS THIN provides a rich API for reading from and writing to FAT formatted SD cards By interfacing the CubeSat Kit to the SD Card via industry standard FAT format CubeSat Kit users can develop and debug their applications easily by reading and writing to the SD Card with both CubeSat Kit hardware and with development PCs All CubeSat Kit information including this manual is available online at http www cubesatkit com Note The version of this manual that accompanies each software release may be newer than that online Information for CubeSat Kit customers is available in the Customer Download Area This area includes CubeSat Kit software schematics specification pages etc CUBE oS SAT SAT User Manual SD Cards amp the CubeSat Kit Supported targets The CubeSat Kit
16. d to prevent damage to the microcontroller in case of an output fault then R59 can always be safely reduced to 0 Warning Reducing R59 such that 1 vcc R59 exceeds the absolute maximum ratings for microcontroller pin current may irreparably damage your microcontroller and or the SD Card should a conflict arise due to incorrect I O port settings UM 4 CubeSat kit SD Card amp EFFS THIN User Manual S User Manual Another High Speed SPI Interface Example Figure 8 below shows a captured set of traces for a Rev D CubeSat Kit running EFFS THIN code on a 24 5MHz Silicon Labs C8051F120 with an SPI clock of 1MHz R69 has been replaced with a 0Q resistor Of note are the fast rise times ca 30ns for both the signals from the processor through u17 to the SD Card cs_sp and those from the SD Card through u18 to the processor MISO SOMI Note Key to signals in oscilloscope trace top to bottom CS_SD MISO SOMI mah umha j Rea POA mi pm h a da la a pa p H A a liala sodas anemenaeneedh dalas doded aaaanasnkni delad dala oaanisaneai fied ol chal r anannsnd aal ade shel enamine iaol doiana lial al ieai a Earne ae A Ape la cide PRN by hte Pane ALS Mapam Lae RA Rs NI RIEL LIES PVA LIRA LY PARI I S Z 10 0us 50 0MS s_ T 2 32V 110M points y Record Dela Set Horiz i Mode Length n Position Waveform XY Display 21 Mar 2011 ample 10M On Off to 10 Display Off 13 38 19 Figure 8 CubeSat Kit 8051
17. each CubeSat Kit EFFS THIN distribution You are free to modify them as you see fit for use on a CubeSat Kit For modifications to the EFFS THIN core you may need to acquire your own source code license for EFFS THIN Contact HCC Embedded directly for more information UM 4 CubeSat Kit SD Card amp EFFS THIN User Manual 27 CUBE oo SAT SAT a Software User Manual How much program and data memory does EFFS THIN use This depends on which EFFS THIN library you choose and hence on the build configuration of EFFS THIN You can check the build results and or map file of the example projects to see how large EFFS THIN is in a real world situation SD Card transfers are done in blocks of 512 bytes Therefore the data memory requirements of an EFFS THIN application will consume around 512 bytes per open file handle Why aren t csk_sd c and the SPI driver included in the EFFS THIN library Hardware These two files are driver level files for the CubeSat Kit The EFFS THIN library files are driver independent files By keeping the two separate a more flexible system is created wherein e g the user can implement changes and extensions as required What speeds does the CubeSat Kit s SD Card run at 28 The SD Card specification requires that initial discovery of the SD Card be performed at an SPI bus clock speed of less than 400kHz 6 Thereafter the SD Card specification permits the interface to run as fast as the card per
18. ed with the CubeSat Kit s SD Card socket Note The Rev D CubeSat Kit permits a vcc different from VCC_CARD 3 3V vcc and vcc_carD voltages are set by the PPM and or the Motherboard MB Development Board DB In nearly all cases vcc_cARD should be set to 3 3V Pumpkin does not validate different SD Card brands and manufacturers Functional test and validation of SD Cards remains the obligation of the CubeSat Kit user UM 4 CubeSat kit SD Card amp EFFS THIN User Manual su oe KIT J User Manual Pumpkin offers extended range industrial SD Cards for use with the CubeSat Kit UM 4 CubeSat Kit SD Card amp EFFS THIN User Manual 15 CUBE SAT KIT o o d User Manual EFFS THIN amp the CubeSat Kit SD Card compatibility EFFS THIN is compatible with SD Cards of up to 2GB capacity A future release of EFFS THIN for the CubeSat Kit may include SDHC Card support starting at 4GB Acquiring EFFS THIN for the CubeSat Kit Customers with valid CubeSat Kit licenses can download the CubeSat Kit s EFFS THIN installer directly from the CubeSat Kit website Each installer is built for a particular CubeSat Kit distribution For example CubeSat Kits for the MSP430 microcontroller are supplied with a version of the CubeSat Kit EFFS THIN software that works only with MSP430 microcontrollers and only with supported compilers Each library is supplied as a Windows installer and has a descriptive name e g cubesa
19. imo Transaction FFFF FFFF FFFF S1FF OOFF 8DFF C4FE 293 0 01 630 190 19 2 ms 5325 aR MOSI FF FF FF 51 00 8D C4 00 1B FF FFE 294 0 01 630 190 19 2 ms 5328 1010 MISO FF FF FF FF FF FF FF FF FF FF FF C 295 0 01 650 555 565 us 128 imo Transaction FFFF FFFF FFFF 4DFF OOFF OOFF OOFE 298 0 01 651 168 566 us 128 ieo Transaction FFFF FFFF FFFF 4DFF OOFF OOFF OOFE 301 0 01 651 772 20 3 ms 620 8 uo Transaction FFFF FFFF FFFF S8 F OOFF 8DFF C4FE 304 0 01 672 206 19 2 ms 5338 ino Transaction FFFF FFFF FFFF S1FF OOFF 04FF OAFE 307 0 01 691 583 565 us 128 imo Transaction FFFF FFFF FFFF 4DFF OOFF OOFF OOFE 310 0 01 692 186 20 6 ms 6298 ioo Transaction FFFF FFFF FFFF SSFF OOFF 04FF OAFE 313 AN 713 AAR SRR us 17A E I Transaction RRRR WRER RRRR ANRR NARR NARR nnr ik ware tet waf Be Ho eee Ew No filter 329 records Protocol Lens SPI x a or ES Details 8 x Offset Be as be eo eA Be DE ae AS ca Paves PEER ORF OFF OFF OPE FE OPE FEOF fF OO FE FECRECFE sovrvesesesveeres 0x0010 FF FE 32 31 2E OD OA 49 74 65 72 61 74 69 6F 6E 21 Iteration 0x0020 73 34 20 30 30 30 30 30 30 35 39 36 38 20 20 43 s 0000005968 C 0x0030 75 72 72 65 6E 74 20 74 69 63 6B 73 34 20 30 30 urrent ticks 00 0x0040 30 30 30 30 30 31 32 31 2E OD OA 34 20 20 43 75 OO0000121 4 Cu Ox0050 72 72 65 6E 74 20 74 69 63 6B 73 34 20 30 30 30 rrent ticks 000 Ox0060 38 36 34 31 36 37 35 2E OD OA 49 74 65 72 61 74 68641675 Iterat Ox0070 69 6F 6E 73 34 20 30 30 30
20. mits SD Cards are required to support a minimum interface speed of 25MHz However this is often much greater than the highest possible speed that the CubeSat Kit can support due to either the lack of speed of the processor or interface issues between the processor and the SD Card or both Therefore each SPI driver sets a maximum speed that takes effect after the discovery phase In the CubeSat Kit the default discovery phase SD Card clock speed is 100kHz and the default run phase SD Card clock speed is 500kHz 16 The EFFS THIN source code takes a conservative approach and performs initial discovery at 100kHz or as near to 100kHz as possible UM 4 CubeSat kit SD Card amp EFFS THIN User Manual SAT KIT J User Manual Users are free to change the SPI clock speed via the spi_set_user_baudrate function How is the SD Card interface s speed related to my processor s clock speed The SPI driver sets the speed of the SD Card interface Generally speaking SPI interfaces are relatively insensitive to clock speeds During the discovery phase of the SPI protocol must communicate with the SD Card at less than 400kHz After that communications can proceed at whatever clock speed the SD Card hardware can handle Can I optimize the SPI driver Sure changes to the SPI driver for your particular processor are entirely up to you The supplied SPI drivers are simply a conservative starting point for more advanced SPI drivers
21. ociated with the SD Card drivers they are named spi_xyz These functions are called at various times by the EFFS THIN library code 13 Defined in the SPI driver s header file 14 In an off the shelf EFFS_ THIN implementation the EFFS THIN code normally selects an SPI clock rate based on what the particular SD Card reports as its maximum possible operating speed Because of the issues surrounding the CubeSat Kit s buffering of the SD Card the maximum reported speed may not be compatible with CubeSat Kit operation Therefore a default maximum speed that has been empirically determined is used instead by the CubeSat Kit 15 For extremely size sensitive applications e g MSP430F16xx defining the symbol CSK_SD_DISABLE_USER_BAUDRATE will suppress the two user functions spi_set_user_baudrate and spi_get_user_baudrate UM 4 CubeSat kit SD Card amp EFFS THIN User Manual SAT KIT o User Manual include lt thin_usr h gt volatile unsigned int error_code spi_set_user_baudrate 2350000 while error_code f_initvolume 0 Figure 11 Configuring SD Card speeds to 2 35MHz Thus it is possible to run the SD Card both faster than the standard 500MHz run speed e g for those users who have replaced R59 with a 0Q resistor and slower than the default initialization speed of 100kHz e g in an attempt to limit power consumption Warning spi_set_user_baudrate does not perform any bounds checking on its argument
22. oftware installer Note The CubeSat Kit EFFS THIN installer simply installs a range of files to particular folders There are no executables installed by the CubeSat Kit EFFS THIN installer EFFS THIN Example Projects A working example project that utilizes EFFS THIN on the CubeSat Kit is invaluable in understanding how to use EFFS THIN and how to build applications with EFFS THIN Each CubeSat Kit EFFS THIN distribution contains at least one CubeSat Kit specific example project that demonstrates the use of EFFS THIN on CubeSat Kit hardware After installing EFFS THIN find the example project build it download it to your CubeSat Kit and run it Note Each example project includes an abstract txt file that explains what the application is doing and how to observe its operation Note CubeSat Kit EFFS THIN example projects may require other Pumpkin software to be installed Check the prerequisites outline in the project s abstract txt file if you are having difficulty successfully building an example project UM 4 CubeSat Kit SD Card amp EFFS THIN User Manual 17 CUBE oo SAT SAT Using EFFS THIN User Manual To use EFFS THIN you must select a precompiled library that contains the features that you want Then you add a few CubeSat Kit and EFFS THIN components to your project make a few settings within your project and make the appropriate calls to the EFFS THIN API from within your application Note To use EFFS_ THIN
23. oller end of the m1so somt line there was no possibility of damaging the microcontroller s GPIO pin in the unlikely but still possible case that P3 2 became an output with a value different from the SD Card s po pin when cs_sp was low i e when the SD Card was selected Note Due to parasitic capacitance and output driver capabilities the series resistors substantially limit the maximum operating speed of the SPI interface The fastest possible SPI interface speeds to the SD Card can be obtained by replacing the series resistors with smaller value resistors Maximum speed is achieved for a value of zero Ohms for each of the series resistors Rev D improved on the situation by truly isolating the SD Card from the rest of the microcontroller bus via ultra low power bus transceivers that are in the high impedance state when deselected and or when either supply voltage is not present The circuitry is shown in Figure 5 vec vee cp 44 o 315 PAD we 0 _o J16 PAD olojo com 2 o 317 PaD 3 par srsv pata asv 3 ccce J12 DM1AA SF PEJ 21 cer D Figure 5 CubeSat Kit Rev D SD Card SPI interface 8 On the MSP430 the sole microcontroller used in the CubeSat Kit at the time of Rev C P3 2 is a general purpose I O pin that can also function as part of the SPI or I2C module of the USARTO peripheral If the P3SEL and or P3DIR
24. peeds ecccecccessseeseeeseesecseceneeeseecsseceaeenseenaeens 22 Examples of Higher SPI Interface Speeds ccccccsseessecenceeseeesecseeceaecnseceseecsaeeneenaeen 24 List of EFFS THIN ab taiies xs cccaseshsasdieinieediaialscdasanstaieasisiderantosd ppsontadinsanrinteasbecninsetadiete 25 List OF SPI DrIVETS siss ccsusehsdenchaseucseasd e EEA EE EAE EE TANT ET EER 25 SD Card Database nnise onan iosi o beds a EE RERE EEA E E R 26 Frequently Asked Questions FAQ essesesssessessresessressesseesossresssseessesorssessesstenossressesorssessrssee 27 General esaer che ce cha dca vee a E cua cae a ueeatias cece sone tueees etic 27 Why can t I change some of the EFFS THIN configuration options e g BE KKK Psa A tesa te dune E A A ee reds A A E E oeeeae 27 None of the CubeSat Kit s EFFS THIN libraries have exactly the configuration s I want need What can I do ccceescescessceseceesceeeeeeeeeeseeeseeeseeeseecsaecaecaeenseenaeeees 27 I would like to implement an extension to EFFS THIN like TMR Triple Majority Redundancy How can I do that ccccecccecsseeseeseeseeesecseceeeneeeeenes 27 DOOMUW ADS urn na i a E E a 28 How much program and data memory does EFFS THIN use 28 Why aren t csk_sd c and the SPI driver included in the EFFS THIN library 28 Hardwarearen R E EEE E Ea 28 What speeds does the CubeSat Kit s SD Card run at oo ccc ecccccceseeeteceteeeneeeeenaeens 28 How is the SD Card interface s speed related to my
25. processor s clock speed 29 Can I optimize the SPI driver ccccccssccssecsseccssecsseceseceseceaeenseeseaeceaeeneeseeeseeeeeeeeaes 29 Can I run multiple SD Cards in a CubeSat Kit Can I connect multiple processors to one or more SD Cards in a CubeSat Kit oo eceeceeceeneeeeeceeeeeeesecneeeeeeeeenaeeaees 29 UM 4 CubeSat kit SD Card amp EFFS THIN User Manual w KIT 3 User Manual TAG CTS ssa tess vtec resvi vot iiia eE E EEEN heane waglapenag exeaeeea teas usd endeeieheeae tan ceapeueenies 29 On what targets can I use applications built with the CubeSat Kit s EFFS THIN 29 UM 4 CubeSat Kit SD Card amp EFFS THIN User Manual 3 SAT KIT User Manual CHANGELOG Rev Date Author Comments B 20110916 AEK Updated PIC24 compatibility listings to include PIC24FJ256GB210 as used on PPM E1 amp PSPM E 4 UM 4 CubeSat Kit SD Card amp EFFS THIN User Manual CUBE oS SAT SAT a Introduction Information UM 4 CubeSat Kit SD Card amp EFFS THIN User Manual User Manual Pumpkin Inc s CubeSat Kit CSK is a commercial off the shelf COTS kit designed to radically reduce the time and effort required to build a functional satellite conforming to the current CubeSat http www cubesat org specification Starting with Rev C the CubeSat Kit architecture has supported an SD Card for on board mass storage The SD Card interfaces to the CubeSat via a 4 wire interface SD Card SPI Bus Proto
26. rd on the CubeSat Kit the chip select signal is called cs_sD and is present on IO 0 2 This is the SPI scLK signal This CubeSat Kit signal is called ScKo and is present on 10 3 3 This is the SPI Mosz signal This CubeSat Kit signal is called sp00 and is present on IO 1 4 This is the SPI MISO signal This CubeSat Kit signal is called SDIO and is present on 10 2 UM 4 CubeSat Kit SD Card amp EFFS THIN User Manual CUBE oTo SAT KIT o OOOO O l User Manual Master is clocking in data from the SPI Slave i e the SD Card The most from the microcontroller line remains high all 1s while the m1so line from the SD Card contains valid data 0x00 08 00 OA 00 OC OO are shown You can see that cs_sp aka ss is low for the entire time of this transfer scx idles low and MISO data is valid when scx aka ScLk transitions from low to high 620mdiv Ha REN l pvertical HHIHH 404 27 Hz MOSI MISO 403 94 Hz MOSI FF MISO 00 A500 00kHz2 value Mean Min Max Std Dev Low resolution Z 20 0us 1 00MS s DO 1 65V Bus Search events found 2 10k points Bus BI Define B1 Label z SPI Inputs reso contgure SPI f Bus visp cont ra 1e Apr 2010 Figure 2 Oscilloscope capture of SD Card signals running at 500kHz on CubeSat Kit hardware Figure 3 below shows SPI traffic between the microcontroller and the SD Card captured via an SPI analyzer An analyzer like this can show a
27. s SD Card libraries are compatible with the following targets and compilers CubeSat Kit Target Processor Compiler s CSK 8051 8051F120 Keil C51 oe i Rowley CrossWorks for MSP430 v1 CSK MSP430 MSP430F1612 Rowley CrossWorks for MSP430 v2 MSP430F2618 Rowley CrossWorks for MSP430 v2 PIC24FJ256GA110 CSKIPIC24 PIC24FJ256GB210 Microchip MPLAB C30 v3 CSK dsPIC33 dsPIC33FJ256GP710 Figure 1 Supported Targets and Compilers SD Card SPI Interface The CubeSat Kit interfaces to its SD Card via a 4 wire SPI interface The SD Card is an SPI slave and the processor that reads from it and writes to it is an SPI Master Four signals are used cs_sD Chip Select for the SD Card scLK master clock Most SIMO Master Out Slave In and miso somr Master In Slave Out SD Cards operate in SPI Mode 0 cpoL 0 cpHa 0 In this mode the base value of the clock is zero i e it idles low and is high when active The SD Card is accessed when its chip select line is active Incoming data is sampled on the rising edge of the clock Outgoing data is presented on the falling edge of the clock This is true for the SPI bus master and every slave on the SPI bus An example of the four SPI lines running on a CubeSat Kit with a clock speed of 500MHz is shown in Figure 2 below gt The SPI l By 4 wire we mean the three usual SPI signals SCLK MOSI and MISO and a discrete chip select signal For the SD Ca
28. seceeecseeeseeeseneeeseecaeecsaecsueceaecaecnaeeneeeseeeeeeesenesenes 14 EFFS THIN amp the CubeSat Mit ceccacsgccsipieeeteaciccteeleccttesependapcioenden ea neeurmene 16 SD Card compatibility oscccscscc ascacecahsscoeuseavaccasbasaccaanesacdiandedeeasseheceasnas sacaasatasenabaeaneemeuteontes 16 Acquiring EFFS THIN for the CubeSat Kit 0 0 ccccccccseceseceseceseceeeeeeeeeeeeeeneesseeeseeeseeesaes 16 Installing EFFS THIN c cssscsesscecsccssessecesessvcsosscosscesscesscessaeasacesncesstasncesaneseseedacansesse 16 EFFS THIN Example Projects cccccsccssecsseceseceseceecseeseecseeeseeeeseeeeaeecaeesaeecueseaeeeaeenaeens 17 Usmeg EFES THIN cs asec ton spvetcracencencese cca a EE E eee 18 Selecting a Precompiled Library 0 ccccccsscsseesseceseceeceseceeaeceseceeeseeeseceseneeeeeseeeeees 18 Add GSK SAiC sdssszeesccasssek jedaswacsecasavs Shsteavh cestea dt esnaaned dodtevs Lectnaasaceanedaadenmaesviediaus S 19 Add EFFS THIN SPI Dive vcscacecsssscecsctocvsnssiescecteassedesepnecetacdscetaveteececsenoestesnpeseeecyeces 19 Add EFFS THIN Library oss czas iris sa tino es sateyn ioc Sa cia incase nike ase Roshi nc ela 19 Add Include Paths jcc cce0ssdciacis 5a steshssadavdessiadenassddacheegienseieteancbossscuuvdassdehieasewzevbesndede 20 Define the CSK PFS THIN LIB Symbol ssccrcscncscciacscscsoaearccedsectceoeenateneetaeredt 20 Calling the EFFS THIN AP 2sseccevernneecenoeestananennsp edie aroeemere 21 Running the SPI Interface at Other S
29. t a glance whether or not the SPI bus is running correctly and what sort of data is traveling on the most and mIso lines 5 Shown on a Tektronix MSO 4034 with the DPO4EMBD Embedded Serial Triggering and Analysis option Channel 1 analog is probing a buffered version of SCK Bus 1 digital D3 D0 are defined as SPI signals 6 Captured via a Total Phase Beagle I2C SPI analyzer These low cost analyzers can be connected directly to the CubeSat Kit bus via the CubeSat Kit Breakout Board The compatible connector on the CubeSat Kit Breakout Board maps CS_SD to the chip select input of the Beagle I2C SPI analyzer UM 4 CubeSat Kit SD Card amp EFFS THIN User Manual 7 sue KIT o User Manual Untitled Total Phase Data Center Fie Edit Analyzer View Help iB Ba a f gt 1 2248 DRAH Index m s ms us Dur Len Err Record al Navigator ax 274 0 01 481174 19 4ms 538 B ino Transaction FFFF FFFF FFFF 51FF OOFF OOFF 42FE MISO Data 277 0 01 510 967 19 2 ms 5338 imo Transaction FFFF FFFF FFFF S1FF OOFF OOFF 44FE 280 0 01 542147 19 2 ms 533 B ioo Transaction FFFF FFFF FFFF S1FF OOFF OOFF 46FF 283 0 01 573 319 19 2 ms 5338 imo Transaction FFFF FFFF FFFF S1FF OOFF OOFF 48FF 286 0 01 604 493 19 2 ms 5338 io Transaction FFFF FFFF FFFF S1FF OOFF OOFF 4AFE 289 0 01 629 555 571 us 128 ie Transaction FFFF FFFF FFFF 4DFF OOFF OOFF OOFE 292 0 01 630 190 19 2 ms 532 B E
30. tkit effs thin msp430 1 8 9 rc2 ex Installing EFFS THIN 16 Obtain and run the CubeSat Kit EFFS THIN installer on a Windows machine The installer s default options will place the various required files in the standard CubeSat Kit locations compatible with example projects 10 Since EFFS THIN is provided as a collection of pre compiled libraries only the compiler used to generate the libraries at Pumpkin can be used by the user to create applications that use EFFS THIN ai Pumpkin installers are created with NSIS and open source installer packager NSIS archives can be unzipped via the free 7 Zip utility Thus the files in an NSIS installer can be extracted on a Linux machine via 7 Zip UM 4 CubeSat kit SD Card amp EFFS THIN User Manual SAT Ae KIT J User Manual BG FS THIN msp430 Software 1 8 9 rc2 Setup U BE Welcome to the CubeSat Kit EFFS THIN msp430 Software Setup This wizard will quide you through the installation of CubeSat Kit EFFS THIN msp430 Software The CubeSat Kitis an integrated solution for creating small satellites that conform to the open CubeSat Kit standard Each CubeSat Kit contains electronics structural elements and software CubeSat Kit software is provided in various forms including example projects source source code and libraries Use this software to develop your CubeSat Kit into a fully functional small satellite Click Next to continue Figure 9 CubeSat Kit EFFS THIN s

Download Pdf Manuals

image

Related Search

Related Contents

OUTILLAGE POUR SYSTÈMES À SERTIR ET À - AC-FIX  User`s Manual: Series 430I Model 430I AC-Powered Three  GL APS Software User Manual  取扱説明書 18mm ハンマドリル  ES Instrucciones de uso  IOGear GIC704SR5W6 User's Manual  Lightolier G7057 User's Manual  Hotpoint LI2SZA User's Manual  Inno Slide 2100  [1 ] Oracle® Fusion Middleware  

Copyright © All rights reserved.
Failed to retrieve file