Smart Bluetooth Forum Discussions
Hello All,
Having a problem with the SPI interface on the BCM20732S (and BCM20736S). We had this working previously with different IO on the BCM20732S (same chip) on a past project. The only activity we see now is a 25.5us low pulse on the SPI CS. Any ideas? TIA
Using these NEW pins (highlighted in yellow):
Logic Analyzer probe of the SPI signals. SPI Clock is always low. MISO is always low, MOSI is always high:
Older code & Schematic snippets (working):
Spi init-
// SPI:
#define CS1_PORT 1 // use P26 for SPI_CS1_LED1
#define CS1_PIN 10
#define CS2_PORT 0 // use P2 for SPI_CS2_LED2
#define CS2_PIN 2
#define SPEED 8000000 // Use 8M speed
#define CS_ASSERT 0 // CS is active low
#define CS_DEASSERT 1
void DW_Gateway_SpiInit(void)
{
// Use SPIFFY2 interface as master
spi2PortConfig.masterOrSlave = MASTER2_CONFIG;
// pull for MISO for master, MOSI/CLOCK/CS if slave mode
spi2PortConfig.pinPullConfig = INPUT_PIN_PULL_UP;
// Use P3 for CLK, P0 for MOSI and P1 for MISO
spi2PortConfig.spiGpioConfig = MASTER2_P03_CLK_P00_MOSI_P01_MISO;
// Initialize SPIFFY2 instance
spiffyd_init(SPIFFYD_2);
// Define this to the Port/Pin you want to use for CS. // Port = P#/16 and PIN = P# % 16
// Configure the CS pin and deassert it intially. If enabling output, you only need to configure once. Use gpio_setPinOutput to toggle value being o/p
gpio_configurePin(CS1_PORT, CS1_PIN, GPIO_OUTPUT_ENABLE | GPIO_INPUT_DISABLE, CS_DEASSERT);
gpio_configurePin(CS2_PORT, CS2_PIN, GPIO_OUTPUT_ENABLE | GPIO_INPUT_DISABLE, CS_DEASSERT);
// Configure the SPIFFY2 HW block
spiffyd_configure(SPIFFYD_2, SPEED, SPI_MSB_FIRST, SPI_SS_ACTIVE_LOW, SPI_MODE_0); // Originally SPI_MODE_3, but problems with Freq Synth Writes
// Deassert chip selects
gpio_setPinOutput(CS1_PORT, CS1_PIN, CS_DEASSERT);
gpio_setPinOutput(CS2_PORT, CS2_PIN, CS_DEASSERT);
}
Newer code & Schematic snippets (not working):
Spi init-
// SPI:
#define CS1_PORT 1 // use P26 for SPI_CS to accelerometer
#define CS1_PIN 10
#define CS2_PORT 0 // use P8 for SPI_USB_CSn to USB/uController
#define CS2_PIN 8
void Macnica_Mpression_SpiInit(void)
{
gpio_configurePin(0, 0, GPIO_OUTPUT_DISABLE | GPIO_INPUT_DISABLE, CS_DEASSERT);
gpio_configurePin(0, 1, GPIO_OUTPUT_DISABLE | GPIO_INPUT_DISABLE, CS_DEASSERT);
gpio_configurePin(0, 2, GPIO_OUTPUT_DISABLE | GPIO_INPUT_DISABLE, CS_DEASSERT);
gpio_setPinOutput(0, 0, CS_DEASSERT);
gpio_setPinOutput(0, 1, CS_DEASSERT);
gpio_setPinOutput(0, 2, CS_DEASSERT);
// Use SPIFFY2 interface as master
spi2PortConfig.masterOrSlave = MASTER2_CONFIG;
// pull for MISO for master, MOSI/CLOCK/CS if slave mode
spi2PortConfig.pinPullConfig = INPUT_PIN_PULL_UP;
// Use P3 for CLK, P0 for MOSI and P1 for MISO
spi2PortConfig.spiGpioConfig = MASTER2_P24_CLK_P27_MOSI_P25_MISO;
// Initialize SPIFFY2 instance
spiffyd_init(SPIFFYD_2);
// Define this to the Port/Pin you want to use for CS. // Port = P#/16 and PIN = P# % 16
// Configure the CS pin and deassert it intially. If enabling output, you only need to configure once. Use gpio_setPinOutput to toggle value being o/p
gpio_configurePin(CS1_PORT, CS1_PIN, GPIO_OUTPUT_ENABLE | GPIO_INPUT_DISABLE, CS_DEASSERT);
gpio_configurePin(CS2_PORT, CS2_PIN, GPIO_OUTPUT_ENABLE | GPIO_INPUT_DISABLE, CS_DEASSERT);
// Configure the SPIFFY2 HW block
spiffyd_configure(SPIFFYD_2, SPEED, SPI_MSB_FIRST, SPI_SS_ACTIVE_LOW, SPI_MODE_0);
// Deassert chip selects
gpio_setPinOutput(CS1_PORT, CS1_PIN, CS_DEASSERT);
gpio_setPinOutput(CS2_PORT, CS2_PIN, CS_DEASSERT);
}
Show Less
I received the new dev kit I am trying to run the spi_comm_slave application with and SPI connection to our Renesas board. The new dev kit has GPIO Headers that I am using to connect the SPI using P1 (MISO) P2 (CS) P3 (SCLK) P4 (MOSI) and P15(Flow Control). The program runs but I am unable to get the flow control to output on header J8. I tried using P32, P13 for flow control with same result. The spi_comm_slave app uses P14, but there is no header available for this pin. Any ideas?
Show LessDear Team
I need to send 13 BLE advertisement packet per second on ADV_NONCONN_IND mode, and also I understand that on that condition will not available to adjust less than 100msec according to SIG V4.0-Vol2-7.8.5 item.
Would you please help me any way in order to advertising on that circumstance.
Thank you
Daniel
Show Less
Using SPIFFY2 in Master mode on BMC20737 TAG board I am able to send several bytes (6 to 😎 and see my clock and data going out on the scope, but after about the seventh byte the SPI Xmit function hangs, no further transmits or traces are output, and after about 5 seconds the board resets and starts all over again.
I'm running at 1,000,000 speed and have tried all 4 SPI modes and various combinations of pull up, floating and pull down, and about anything I can try including delays between byte transfers.
Any ideas on what the problem could be? I have heard references to a FIFO buffer with limit of 16 bytes, but I don't think I'm even halfway to that point when it hangs. I'm using a modified version of the Heart Rate Monitor App that comes with the SDK.
Also, when I tried 2,000,000 speed I got some weird results in the data output trace... looked like the FF I sent was changed to a F0. Need to experiment with this more to be sure it was the speed setting and not some other catastrophic failure.
Any suggestions are appreciated.
Thanks,
Eric
p.s. using a very recent SDK 2.1.something
Show LessI am trying to hook up an SPI peripheral to a board based on the BCM20732S.
I am trying to use the pin combination "MASTER2_P03_CLK_P02_MOSI_P01_MISO"
However, it does not seem to work. I see the clock signal on P03, but there is no output on P02.
I noticed in the manual that P1 is internally connected to the /WP on the internal eeprom - is this a problem?
If this combination is not going to work, can you recommend a pin choice that should work?
Show Less
I installed WICED smart IDE and plug the wiced smart in with usb cable. but the device driver verification fails.
In device manager, i see this
other devices
Enhanced Com port
Standard Com port
Even I point out the driver location of WICED-smart, the driver can not be installed.
In my laptop, I have a couple of verisons of WICED IDE. Not sure this is an issue or not.
One verison for old wiced chip used to work. But I do not touch it for a long time.
I just installed the new version for latest wiced wifi chip,which is under development, a few days ago.
Show LessHas anybody done this?
Is it possible to update the WSUpgradeOTA(and other) files via OTA? Or can I only do that by directly writing to the device over HCI TX/RX?
Also, is it possible to upgrade from non-secure-OTA to secure-OTA via OTA?
thanks!
akbar
Show LessOn BCM20737, is it possible to clock CPU over 24 MHz?
Our use case is using PUART at ~1Mbps and it is observed that PUART callback latency is substantially long sometimes
especially when the Master device receives data from the multiple Slaves simultaneously.
So, I wanted to check the possibility of bumping up CPU clock speed.
Thanks
Show Less