Smart Bluetooth Forum Discussions
Hi all,
I have a problem when I use SPI as slave mode ( BCM20732).
When I receive data from external MCU via SPI, I try to write this data to a characteristic value.
Code below:
spiffyd_slaveRxData(SPIFFYD_2, length, &buffer[1]);
db_pdu.len = length;
memcpy(db_pdu.pdu, &buffer[1],length);
bleprofile_WriteHandle(HANDLE_SPI_CHARACTERISTIC_SEND_DATA_VALUE, &db_pdu);
bleprofile_sendNotification(HANDLE_SPI_CHARACTERISTIC_SEND_DATA_VALUE, (UINT8 *)db_pdu.pdu, db_pdu.len);
It's take about 3ms to do this.
And when I don't write data to characteristic value:
spiffyd_slaveRxData(SPIFFYD_2, length, &buffer[1]);
db_pdu.len = length;
memcpy(db_pdu.pdu, &buffer[1],length);
// bleprofile_WriteHandle(HANDLE_SPI_CHARACTERISTIC_SEND_DATA_VALUE, &db_pdu);
// bleprofile_sendNotification(HANDLE_SPI_CHARACTERISTIC_SEND_DATA_VALUE, (UINT8 *)db_pdu.pdu, db_pdu.len);
It's take only about 100us.
Why do bleprofile_WriteHandle() and bleprofile_sendNotification() functions take a long time?
How can I speed up this?
Hi Sirs,
We use a i2c bus chip that need to wake up it.
The wake up is to make SDA pin low for at 60us and high for 2.5ms.
What I want to do is to use i2c_write() and delay function to match the waveform.
The example code as following:
/* wakeup chip, 60us is required */
i2cm_write(NULL, 0, 0x00); -> can I use this function in such kind of way?
/* a delay function is required here */
delay_ms(3);
Or do you have any suggestion?
For example: to quickly switch from GPIO to I2C?
Show LessHi...
I am using the I2C communication with EEPROM read / write, you must handle.
I2c API below for a description and parameters, thank you.
And the use of known examples would be appreciated.
void | i2cm_init (void) |
void | i2cm_setSpeed (UINT8 speed) |
void | i2cm_setTransactionSpeed (void) |
UINT8 | i2cm_getSpeed (void) |
UINT8 | i2cm_write (UINT8 *data, UINT16 length, UINT8 slave) |
UINT8 | i2cm_read (UINT8 *data, UINT16 length, UINT8 slave) |
UINT8 | i2cm_comboRead (UINT8 *secondTranBuf, UINT16 secondTranCount, UINT8 *firstTranBuf, UINT8 firstTranCount, UINT8 slaveAdr) |
UINT8 | i2cm_comboWrite (UINT8 *secondTranBuf, UINT16 secondTranCount, UINT8 *firstTranBuf, UINT8 firstTranCount, UINT8 slaveAdr) |
I have a Smart Tag that I've been using for development. I'm building an image that acts as the central device for Wiced Sense Kits, connecting to several kits and relaying notification and advertisement data over the PUART.
My image doesn't work in App mode. Instead, the device starts emitting a lot of what appears to be trace data over the HCI UART. I get about a 3 second burst of data every approximately 5 seconds. I'm reasonably sure my app isn't running and causing it because I'm not using any of the trace functions.
I know app mode will work if I set SW4 appropriately because I've loaded and tested other images (the PWM tones image is useful because it's very easy to hear that it is working).
-> Why isn't app mode working for me?
-> What is coming over the HCI UART?
I've attached my source.
Show LessI have few questions regarding BCM20737S module.
From the datasheet (20737S-DS100-R.pdf):
Pin18 and P26 have internal pull down 10K resistors and P38 is no connect (NC).
But from WICED SENSE schematic, Pin18 and P26 have external 10K pull down resistors (redundant) and P38 is grounded.
Please verify the internal 10K Pull downs and that Pin 38 should be NC (or Grounded)
Thank you.
Show LessI have two boards containing 736 sips that I am unable to program. I'm pretty sure that hardware is not the problem as I've been working with these for some time now and have always been able to flash them without incident. I think it is entirely due to firmware as they stopped responding after I flashed a 737 image onto them this morning (I updated to the 2.1.1 sdk and when I created new targets I didn't update the platform string). The firmware had not been previously tested and I am not confident that it was bug-free.
In any event, would a bad image and/or firmware cause a sip to suddenly stop responding to programming attempts (normal and recovery)? The rx line is high at power up and it looks like the process is trying to start but the chip never responds. I am not seeing any advertisements from the board. We are running the SIP at 1.8V and the chip has power and the reset line is not pulled.
I programmed both boards using the exact same setup so I know they were detected and were accepting commands.
Show Less
Hi there guys,
Trying to write a vendor specific profile with a vendor specific service that contains two writable characteristics which will pipe any written data out the uart upon write. I have my pass to uart function occurring in the smart wizard generated functions which are called by the write handler.
Example:
// It will be called at the write handler and should return TRUE if any persistent value is changed
BOOL on_write_service_characteristic(int len, UINT8 *attrPtr)
The problem that I am running into is that the ENTIRE characteristic is being passed via the attrPtr, not just the data that was just written to it. So for example if the characteristic previously contained the data "this is a very long string" and the data "hello" is written, the attrPtr will contain "hellos very long string" and len will be the value 26 instead of the 5 that I wanted.
How can I get just a pointer to the data written and it's length, NOT the entire characteristic?
Show LessHW: 20737.
SW: SDK2.1
Problem: Use I2C driver API,
cfa_bsc_OpExtended(buffer, length, NULL, 0, slave_address,I2C_SLAVE_OPERATION_WRITE); |
where if the length > 16B, like length = 32B, from I2C monitor,
the write action will only take 16B into I2C bus.
Symptom:
I try to make a I2C write to one device component;
size = 33B
40 43 33 00 10 68 1C 6B 09 79 0C 80 00 C8 00 32 00 14 03 E8 01 00 C8 10 04 00 0A 10 5E FF CE FF CE
after calling I2C API,
the data is truncated into 2 section and plz see the attached snapshot.
Is any place to configure the I2C max. size?
Show LessI used to use AVR then, recently begin to use Broadcom's BLE module "BCM20737S".
But I don't get how to configure IO register's(ex.gpio,pwm,a/d converter) in BCM20737S. What document can I refer ?
I don't know why, but they aren't exist in datasheet...
Show Less