Use SD card to save data and also GPMC bus

523 views
Skip to first unread message

Alberto Potenza

unread,
Oct 10, 2013, 12:45:24 PM10/10/13
to beagl...@googlegroups.com
Dear all,
I need help to understand if BBB fits what I need.
I would like to use the BBB-GPMC bus to communicate with an FPGA (placed on a custom made PCB) and save some data in the SD card.
In particular, I would like to send data from FPGA to BBB, have some data-analysis and then save them in the SD card.
I would like to use GPMC bus because I need to be fast.

Now, my problem is: how can I boot the BBB?
I cannot use the eMMC because I am already using the GPMC.
I prefer to not boot by using the same SD card that I use to save data (I would like to have it independent).

-> I could add a flash memory on the PCB hosting the FPGA and use it to boot, but is there a way to do it (GPMC bus is already used and I do not think that I can use another bus-type to communicate)?
-> I could add an SD card on that PCB but is there a way to save data on that SD card  (again, GPMC bus is already used and I do not know if I can use SPI to save directly in the SD)?

 
Any idea is really appreciated.

Thanks.

Alberto


Gerald Coley

unread,
Oct 10, 2013, 2:07:39 PM10/10/13
to beagl...@googlegroups.com
Well, the options are eMMC and SD. You could create a second SC slot on an expansion board, but I suspect that will be taken up by the GPMC. You could try SPI boot, although I have never done that, it should work. It will be slow, but functional.

Gerald



--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Alberto Potenza

unread,
Oct 11, 2013, 6:49:43 AM10/11/13
to beagl...@googlegroups.com
Hello Gerald,
I am starting to think to use the SPI approach to send data from FPGA to BBB.
This is a completely different approach but it will allow me to boot from the eMMC and save data in the SC.
I think that the max speed to send data should be 48 MHz (but I should look around if it is right...if someone has it on the fingers...otherwise I will check it...).

Thanks for your previous answer.

Cheers.

Gerald Coley

unread,
Oct 11, 2013, 8:26:36 AM10/11/13
to beagl...@googlegroups.com
Is that going to be fast enough for your application?

Gerald

Alberto Potenza

unread,
Oct 11, 2013, 10:58:16 AM10/11/13
to beagl...@googlegroups.com
Look,
I should have 32-bit data generated with a frequency  f =100kHz.
Which means a data throughput of 3.2Mb/s.
With SPI I should have the possibility to work with a data throughput of 48Mb/s (which is more than 10 times faster).
I already know your question:
"But in the previous post you said that you needed GPMC for high data throughput...but it seems to be not...why?"
Because I will probably will asked to manage an higher data throughput in a couple of years, so I decided to save time now...

But right now it seems that SPI is the best compromise between performance and realization-time.

Thanks a lot for your effort.

Regards.

Alberto

Gerald Coley

unread,
Oct 11, 2013, 3:03:18 PM10/11/13
to beagl...@googlegroups.com
Depends on your definition of HIGH. GPMC is 100MHZ and up to 16Bits wide.

Gerald



Alberto Potenza

unread,
Oct 14, 2013, 3:43:28 AM10/14/13
to beagl...@googlegroups.com
Dear Gerald,
once again you are right: I should not use the word "high" so easily.
By the way, thanks again for your help.

Alberto

Alberto Potenza

unread,
Oct 14, 2013, 10:21:11 AM10/14/13
to beagl...@googlegroups.com
Dear Gerald,
I was reading again your answers and there are some points not fully clear.

In the "BeagleBone Black System Reference Manual" there is written:
"GPMC bus may NOT be available due to the use of those signals by the eMMC." (pag. 37).

At pag. 61 there is a schematic view of the connection between AM3358 and the flash. Now, only 10 MMC1 connections are used (from MMC1_DAT0 to MMC1_DAT7, MMC1_CMD and MMC1_CLK).
By using the Schematic A6 file (here http://circuitco.com/support/index.php?title=BeagleBoneBlack), at pag.3 it is possible to see that those MMC1 connections correspond to GPMC_AD0 -> GPMC_AD7, GPMC_CSN1 and GPMC_CSN2.
Summarizing:
MMC1_DAT0 ->  MMC1_DAT7         ==   GPMC_AD0 -> GPMC_AD7
MMC1_CMD                                  ==    GPMC_CSN1
MMC1_CLK                                   ==    GPMC_CSN2

Now, if we take again the "BeagleBone Black System Reference Manual" at pag.82 there is written how it is possible to set the connector P8. We can suppose to be in mode 0 (which is different from the mode 0 boot mode...I wrote it just to avoid confusion).
In that connector I have again GPMC_AD0 -> GPMC_AD7 but I cannot used them because they are already sent to the flash (I guess...). However, I still have some GPMC lines that, in principle, I could use (GPMC_AD8 -> GPMC_AD15) to send data.
Accoridng to the "AM335x ARM® Cortex™-A8 Microprocessors (MPUs)" TRM, GPMC AD lines are for both address and data while GPMC A lines are for address only.
Consequently, I could set an address by using:
GPIO1_16       (which is GPMC_a0)
GPIO1_17       (which is GPMC_a1)
EHRPWM1A   (which is GPMC_a2)
EHRPWM1B   (which is GPMC_a3)
Moreover, I have a line GPIO2_1 (which should be a clock -> gpmc_clk_mux0) that I could use as clock and 8 GPMC lines to send data (GPMC_AD8 -> GPMC_AD15). If I have an external memory which does not need an address to send out data, I could set fake a fake address on the GPMC_A lines and send real data on the 8 GPMC AD lines.
Is that right or, as soon as I use some GPMC lines for the eMMC, the full GPMC bus becomes inaccessible? 
Moreover, does the GPMC bus work with 8-bit data or, according with the description in the TRM, it requires only 16 bit data (because the ARM takes always GPMC_AD0 -> GPMC_AD15, but the first lines of the bus are connected to the eMMC and it could mess up everything)?

Now, we can suppose that I do not want to use the eMMC boot mode. In this way I should free the GPMC. If I set the connector P8 in mode-1, at pag.82 of the "BeagleBone Black System Reference Manual" I can see GPMC_a for addressing (from a0 to a19) but I do not see GPMC_ad for data. Where my data goes? Also here, where I am wrong?
Now, if I am in mode-1 and I want to communicate with an external device (it could be a flash memory or a sd card or something else) by using the mmc1_dat lines (from 0 to 7) how can I do it, because I do not see the  mmc1_cmd signal and the mmc1_clk signal. Now, why there is the possibility to send out the mmc signals without a clock for them? Am I missing something also here?

Thanks again for your help.

Gerald Coley

unread,
Oct 14, 2013, 10:51:38 AM10/14/13
to beagl...@googlegroups.com
See blow.

Gerald


On Mon, Oct 14, 2013 at 9:21 AM, Alberto Potenza <alberto....@gmail.com> wrote:
Dear Gerald,
I was reading again your answers and there are some points not fully clear.

In the "BeagleBone Black System Reference Manual" there is written:
"GPMC bus may NOT be available due to the use of those signals by the eMMC." (pag. 37).

That is correct. You need to disable the eMMC and boot from uSD to access those signals.
 

At pag. 61 there is a schematic view of the connection between AM3358 and the flash. Now, only 10 MMC1 connections are used (from MMC1_DAT0 to MMC1_DAT7, MMC1_CMD and MMC1_CLK).
By using the Schematic A6 file (here http://circuitco.com/support/index.php?title=BeagleBoneBlack), at pag.3 it is possible to see that those MMC1 connections correspond to GPMC_AD0 -> GPMC_AD7, GPMC_CSN1 and GPMC_CSN2.
Summarizing:
MMC1_DAT0 ->  MMC1_DAT7         ==   GPMC_AD0 -> GPMC_AD7
MMC1_CMD                                  ==    GPMC_CSN1
MMC1_CLK                                   ==    GPMC_CSN2

Correct.

 
Now, if we take again the "BeagleBone Black System Reference Manual" at pag.82 there is written how it is possible to set the connector P8. We can suppose to be in mode 0 (which is different from the mode 0 boot mode...I wrote it just to avoid confusion).
In that connector I have again GPMC_AD0 -> GPMC_AD7 but I cannot used them because they are already sent to the flash (I guess...).

Incorrect. See above.
 
However, I still have some GPMC lines that, in principle, I could use (GPMC_AD8 -> GPMC_AD15) to send data.
Accoridng to the "AM335x ARM® Cortex™-A8 Microprocessors (MPUs)" TRM, GPMC AD lines are for both address and data while GPMC A lines are for address only.
Consequently, I could set an address by using:
GPIO1_16       (which is GPMC_a0)
GPIO1_17       (which is GPMC_a1)
EHRPWM1A   (which is GPMC_a2)
EHRPWM1B   (which is GPMC_a3)
Moreover, I have a line GPIO2_1 (which should be a clock -> gpmc_clk_mux0) that I could use as clock and 8 GPMC lines to send data (GPMC_AD8 -> GPMC_AD15). If I have an external memory which does not need an address to send out data, I could set fake a fake address on the GPMC_A lines and send real data on the 8 GPMC AD lines.
Is that right or, as soon as I use some GPMC lines for the eMMC, the full GPMC bus becomes inaccessible? 
Moreover, does the GPMC bus work with 8-bit data or, according with the description in the TRM, it requires only 16 bit data (because the ARM takes always GPMC_AD0 -> GPMC_AD15, but the first lines of the bus are connected to the eMMC and it could mess up everything)?

Now, we can suppose that I do not want to use the eMMC boot mode. In this way I should free the GPMC. If I set the connector P8 in mode-1, at pag.82 of the "BeagleBone Black System Reference Manual" I can see GPMC_a for addressing (from a0 to a19) but I do not see GPMC_ad for data. Where my data goes?

Address and data are multiplexed onto the same pins. Use the GPMC_ALE signal to latch the Address.

Alberto Potenza

unread,
Oct 14, 2013, 12:06:57 PM10/14/13
to beagl...@googlegroups.com


Dear Gerald,
thanks a lot for your help: it is really useful for me to have you on the other side.
Maybe I'm begginning to see the light (as Duke Ellington said...).
Now, this point is not clear to me:

"
Now, if we take again the "BeagleBone Black System Reference Manual" at pag.82 there is written how it is possible to set the connector P8. We can suppose to be in mode 0 (which is different from the mode 0 boot mode...I wrote it just to avoid confusion).
In that connector I have again GPMC_AD0 -> GPMC_AD7 but I cannot used them because they are already sent to the flash (I guess...).

Incorrect. See above.
"
In principle, by booting using the eMMC, I should physically send signals from the AM335 to the flash memory (NAND). I guess that, by using the P8 connector-mode 0 and putting the probe of my oscilloscope on the pin GPIO1_0 (which is gpmc_ad0 in mode 0) I should see the signal DAT0 sent from the AM335 to the NAND (or viceversa...actually I do not know if it is a bi-directional communication on all pins or not). Now, if I try to have a communication also with another external memory (let's suppose a 16-bit non-multiplexed memory), the AM335x will see on one hand gpmc_ad0 -> gpmc_ad7 connected to the flash and, one the other hand, the remaining lines connected to the other memory. As a consequence, it cannot point to an exact memory address of the external device because the first 8 lines (gpmc_ad0 -> gpmc_ad7) are already busy in talking with the flash. Actually, I think it cannot set a memory address at all because the first 8 lines are blind. Moreover, it cannot read data at all from the external memory because it means to have bit also on pin gpmc_ad0 -> gpmc_ad7, which are connected to the flash memory. Is this the reason of the sentence "GPMC bus may NOT be available due to the use of those signals by the eMMC"?

Thanks again.

Alberto


Gerald Coley

unread,
Oct 14, 2013, 12:17:45 PM10/14/13
to beagl...@googlegroups.com
See below.

Gerald


On Mon, Oct 14, 2013 at 11:06 AM, Alberto Potenza <alberto....@gmail.com> wrote:


Dear Gerald,
thanks a lot for your help: it is really useful for me to have you on the other side.
Maybe I'm begginning to see the light (as Duke Ellington said...).
Now, this point is not clear to me:

"
Now, if we take again the "BeagleBone Black System Reference Manual" at pag.82 there is written how it is possible to set the connector P8. We can suppose to be in mode 0 (which is different from the mode 0 boot mode...I wrote it just to avoid confusion).
In that connector I have again GPMC_AD0 -> GPMC_AD7 but I cannot used them because they are already sent to the flash (I guess...).

Incorrect. See above.
"
In principle, by booting using the eMMC, I should physically send signals from the AM335 to the flash memory (NAND). I guess that, by using the P8 connector-mode 0 and putting the probe of my oscilloscope on the pin GPIO1_0 (which is gpmc_ad0 in mode 0) I should see the signal DAT0 sent from the AM335 to the NAND (or viceversa...actually I do not know if it is a bi-directional communication on all pins or not).

Yes,
 
Now, if I try to have a communication also with another external memory

You can't, unless you disable the eMMC and do not use it at all.
 
(let's suppose a 16-bit non-multiplexed memory), the AM335x will see on one hand gpmc_ad0 -> gpmc_ad7 connected to the flash and, one the other hand, the remaining lines connected to the other memory. As a consequence, it cannot point to an exact memory address of the external device because the first 8 lines (gpmc_ad0 -> gpmc_ad7) are already busy in talking with the flash. Actually, I think it cannot set a memory address at all because the first 8 lines are blind. Moreover, it cannot read data at all from the external memory because it means to have bit also on pin gpmc_ad0 -> gpmc_ad7, which are connected to the flash memory. Is this the reason of the sentence "GPMC bus may NOT be available due to the use of those signals by the eMMC"?

Yes. Look at the schematic. They use the same pins. A pin can only be used for one thing at a time. MMC or GPMC. not two things.

Thanks again.

Alberto


Alberto Potenza

unread,
Oct 17, 2013, 4:14:34 AM10/17/13
to beagl...@googlegroups.com
Great!!!

Thanks a lot, you really saved me.

Now it seems to be clearer than before.

Thanks for all your effort.

Alberto

Gerald Coley

unread,
Oct 17, 2013, 10:10:10 AM10/17/13
to beagl...@googlegroups.com
My pleasure!

Gerald

Reply all
Reply to author
Forward
0 new messages