Smart Bluetooth Forum Discussions
Hello, this is Taka, I have a question.
I want to use the puart interrupt and reading some documents.
I hit a discussion of using puart interrupt
here
and there are some macro in the code.
When I wrote this code as the above discussion,
P_UART_WATER_MARK_RX_LEVEL (1);
I got an error as following.
'Symbol 'dc_ptu_uart2_rfl_adr' could not be resolved'
I checked "WICED Smart™ v2.1.1 - API Reference Guide" and following is in the guid.
#define P_UART_WATER_MARK_RX_LEVEL(x) UART_REG(P_UART_WATER_MARK_RX_ADDR) = x
But there is no description of UART_REG(xxx) , I have no idea to fix them...
How sould I do? Do I have to do someting to use the macros?
I just put
#include "puart.h"
at the top of my code.
Show LessHi All,
We changed the resistors as 920737TAG03-HWUM100-R.pdf described.
But when we tried to download in the IDE, the following error comes out:
The board worked well with EEPROM.
What should we check? Thanks in advance!
Best Regards,
Philip
Show LessI want to continuously drive a PWM output (until I choose to turn it off.)
From the part datasheet, the PWM hardware seems capable of continuous output. I just need a way to set it.
pwm_start() seems like the right function to call. But, it only drives the buzzer for a second or so.
(It would be great if I could find the source code for pwm_start(), but that's a different topic.)
I've tried disabling sleep (using advice from the forum,) but to no avail. The buzzer only lasts for a second.
Any advice is appreciated.
My code is a modified hello_sensor. It just enables the buzzer GPIO, initializes ACLK, and starts PWM with something like this:
pwm_start(PWM2, PMU_CLK, 0x2FF, 0x200);
gpio_configurePin((GPIO_PIN_BUZZER) / 16, (GPIO_PIN_BUZZER) % 16, PWM2_OUTPUT_ENABLE_P28, 0);
(I could probably set a timer/interrupt to continuously restart the PWM. But, this seems unnecessarily complex. I'd prefer to just set the PWM hardware to go continuously.)
Show LessHi, i'm currently trying things to make this spi2 work.
The MASTER2_P03_CLK_P02_MOSI_P01_MISO or MASTER2_P03_CLK_P04_MOSI_P01_MISO
settings don't work.
I only got a bad shaped clock on p03.
However when MASTER2_P24_CLK_P04_MOSI_P25_MISO, P4 delivers a good MOSI.
But i can't use this setting ( no pin header ), and i'm already broke the Test point...
What can i do to make this setting work ?
plese help !
Show LessHi,
I'm trying to use more than 2 wiced sense for difference purpose.
One to get temp, the other to get accel sensor data.
But when I check the Advertisement Data, wiced sense is using
the same bt address (20:73:7a:14:b3:db).
This make my android doesn't recognize those 2 wiced sense as
separate entity.
I was able to compile and flash the firmware.
Currently checking the firmware source. Can someone tell me how
to change the local bt address used by wiced sense on the firmware source?
Thanks.
Show LessDear Sir,
We follow the puart_control and trace the source code.
Some definition is unknown.
One is blecon_Conn (UINT8 conn_mode, BD_ADDR peer_addr, UINT8 peer_addr_type)
We can trace others to find out the value of conn_mode and know the meaning.
But no information about peer_addr_type. It should be RANDOM and PUBLIC. But how about the definition of their value ?
Another is HCIULP_ADV_PACKET_REPORT_WDATA, you can see it in puart_control_send_adv_report.
void puart_control_send_adv_report(HCIULP_ADV_PACKET_REPORT_WDATA *evt)
{
int i;
test_puart_write(PUART_CONTROL_EVENT_ADVERTISEMENT_REPORT);
test_puart_write(9 + evt->dataLen); // length
test_puart_write(evt->eventType);
test_puart_write(evt->addressType);
Again, how about the definition of evertType ?
Best Regards,
Rush Chen
Show LessDear Support,
For original design, the WP is Pin1, and the uart_DISABLE_EEPROM_WP_PIN32.hex is available in WICED-Smart-SDK-2.2.0\WICED-Smart-SDK\Platforms\BCM920736TAG_Q32.
We use the WICED to develop our product, and we also change GPIO setting. We move the WP to Pin32.
Could you provide uart_DISABLE_EEPROM_WP_PIN32.hex for Pin 32 setting ?
Best Regards,
Rush Chen
Show LessHi,
Referring to post Connection Interval and Connection Slave Latency What if we need the 20737 as master role to change the parameter to slaves? Any other API?
lel2cap_sendConnParamUpdateReq() can be used anytime when there is a connection (so outside connection up callback is OK too) with a peer device. This however is only a request from the slave to the master to change the connection parameters (only the master can change these).
Another question is about the call back function 'lel2cap_handleConnParamUpdateReq', is this the callback when parameter update request coming from master or slave role or BOTH?
Show Less===
SDK: 2.1.
Tag: 920737.
app: hello-sensor.
===
Problem:
When enable hello_sensor_cfg's
encr_required = SECURITY_ENABLED | SECURITY_REQUEST
--> when phone button disconnection, device can not get plan_air_connection_down() from lower-layer
so the re-connection can not be successful.
but if
encr_required = 0
--> The disconnection from phone is ok and we can re-connect with device again.
it seems to be related with codes below,
if (bleprofile_p_cfg->encr_required != 0)
{
if (emconninfo_deviceBonded())
{
ble_trace0("device bonded");
}
else
{
ble_trace0("device not bonded");
lesmp_pinfo->pairingParam.AuthReq |= LESMP_AUTH_FLAG_BONDING;
lesmp_sendSecurityRequest();
}
return;
}
so any other places go wrong??
Dear Sir,
puart_control is very demo to show up the opeartion of WICED and MCU.
And it also bring lot of question for me.
I check the my_l2cap_data_handler, but I cannot find any errCode detail define.
Could you give me a help to explain the detail define of errCode ?
like.
#define ERRCODE_TIMEOUT xxxx
Best Regards,
Rush Chen
void my_l2cap_data_handler(LEL2CAP_HDR *l2capHdr)
{
LEATT_PDU_HDR *p_gatt_msg = (LEATT_PDU_HDR*) (l2capHdr + 1);
int opcode = (LEATT_OPCODE_MASK & p_gatt_msg->attrCode);
UINT16 con_handle = emconinfo_getConnHandle();
UINT32 con_index = con_handle - RMULP_CONN_HANDLE_START;
ble_trace2("data_handle con_handle:%04x opcode:%04x", con_handle, opcode);
// process messages not processed by the standard l2capHandler
.....
puart_control_send_write_completed(con_handle, p_rsp->errCode);
return;