openwch / ch583 Goto Github PK
View Code? Open in Web Editor NEWThe datasheet/SDK/HDK docmentation of Bluetooth LE RISC-V MCU CH582M/CH583M
License: Apache License 2.0
The datasheet/SDK/HDK docmentation of Bluetooth LE RISC-V MCU CH582M/CH583M
License: Apache License 2.0
How to broadcast Bluetooth Advertisements using coded 125kbps PHY?
The code here: https://github.com/openwch/ch583/blob/main/EVT/EXAM/BLE/SYNC_ADV/APP/broadcaster.c
use GAP_PHY_VAL_LE_1M
I couldn't find anywhere that define 125Kbps coded PHY.
Do you have an example?
Thank you very much!
I am planning to design a project based on CH582F. I tried to find evaluation board for 28 pin chip but could not find one.
Do you have reference schematic somewhere?
Thanks.
It will be great to write software and integrate with Arduino libraries if the core is ported to Arduino IDE.
Hello!
I tried to set system frequency 2 MHz via function SetSysClock(), but after that microcontroller goes into hardfault. In datasheet I found information that Fsys range supports this frequency. I tried to disable SysTick interrupt but this didn't help. I read the implementation of SetSysClock() and info about related registers, it seems that all ok. I suggest that problem may be because flash won't work at this frequency (because if hardfault handler contains custom reset function calling from flash, it won't reset. On the other hand, if I use PFIC_SystemReset(), which is inlineable and only uses peripheral register, it resets). But I would like to know real reason of that.
Hi, i am new to CH582/583.
I am trying to build bluetooth examples on linux with MounRiver and after fixing naming i am getting this error:
riscv-none-embed/bin/ld: cannot find -lCH58xBLE
I know the library is there, but i dont know what may be wrong. Maybe some config.
I dont work with eclipse IDE, so it may be just noobish.
Any help is appreciated.
Thanks
One of my dev boards has lost BLE functionality. I have a known-good elf that works on two of my three boards. Any advice on recovering the broken board? The non-BLE functionality appears to work fine. e.g. I can flash new code which shows that UART3 and GPIO_B4 can be operated.
I'm guessing I flashed something that brought the board to a broken state. I've been unsuccessfully experimenting with adding rust bindings for BLE via the .a files, so I could have easily made a mistake.
Is it possible to add examples code for Infrared transmiter and receiver.
Thanks.
Hi,
The PM demo only implements wake up from GPIO, which is certainly useful in some case but not as much as wake up from RTC. Also since many things are not wrapped in functions yet and there is just no demo for RTC it is unclear what need to be done to achieve deep sleep with RTC wakeup (with LSI).
Could you please update the PM example and add RTC wake up in it (with LSI as clock source)?
I tried to use the sleep function from the HAL directory in BLE demos, however it doesnt work, it never goes to sleep or it goes to sleep without waking up. My understanding is that the HAL functions are only used when working with BLE. In my case the BLE is not used, that is why i need a working implementation of PM demo wth RTC as wakeup source (LSI as clock source).
Thanks.
Hi OpenWCH team,
After ADV event I start capture using timer. In case of very small (10..20us) pulse duration I have timer interrupt invoked when the capture is completed.
But if the signal is long (1ms) - I never got the interrupt.
I assume that BLE stack pushing CH583 to sleep mode before capture completed and this why I don't get timer interrupt.
To solve the issue, I can disable sleep before the measurement and enable after.
Please, advise is the a way how I can temporarly disable sleep mode?
Hi, I tried the Exam/BLE/HID_Keyboard program and downloaded to my CH582M. I changed the parameter of DL Config Pin from PB22 to PB11 and now I can no longer enter bootloader download mode using BOOT button + connecting USB-C and WCHISP tool wont find the device.
The program will start and typing "abcdefg...xyzabc..." once connected to bluetooth HID_Keyboard and reset button only reset the program typing back to "abc...".
Is there anyway for me to enter bootloader/download mode again? Button combination or shorting certain pins?
Dear OpenWCH team.
I'm designing peripherial device that should keep advettisement when connected.
I found that updating GAPROLE_ADVERT_DATA parameter in connected and advertised mode causes change of GAP state from GAPROLE_CONNECTED_ADV to GAPROLE_ADVERTISING, but actually device keep to be connected and advertised.
How to reproduce with BLE_LIB 1.7:
In Peripheral example add the following
uint8_t gapRole_state;
GAPRole_GetParameter(GAPROLE_STATE, &gapRole_state);
PRINT("GAPROLE_STATE: %d\n", gapRole_state);
to the end of performPeriodicTask() function. And add the following
uint8_t initial_advertising_enable = TRUE;
GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED, sizeof(uint8_t), &initial_advertising_enable);
to the end of Peripheral_LinkEstablished(...) func.
Now if you connected to the device, it reports GAPROLE_STATE: 5 in console. (GAPROLE_CONNECTED_ADV state). This is OK.
Next, add the following
GAPRole_SetParameter(GAPROLE_ADVERT_DATA, sizeof(advertData), advertData);
to the very end of performPeriodicTask() function (after printing added earlier).
Now if you connected to the device, it reports GAPROLE_STATE: 2. (GAPROLE_ADVERTISING).
So, GAP role state was changed by updateing data to advertise. My expectation is that updating the adv data should not affect to GAP state.
I would like to use ch581 or ch582 or ch583 chip withh Lora radio. I looked for example code in this repo but could not find one.
Is it possible to use lora with these chips?
Thanks.
The datasheet for the temperature sensor says, in section 15.3.2 Temperature Sensor Sampling The temperature value is obtained according to the conversion relationship between voltage and temperature. Please refer to the evaluation board example program for details.
However, the (only) example ADC program simply reads the temperature sensor channel, without any conversion to a temperature: https://github.com/openwch/ch583/blob/main/EVT/EXAM/ADC/src/Main.c#L51-L62
Please document how we can actually use the temperature sensor.
Hello!
That IC just looks wonderful, congrats!
Next step obviously is to embed it into commercial products. However, I was wondering if any certification was passed regarding the USB & Bluetooth transceivers?
Hi,
is CTE working on CH582/3, because i am having problems to enable it in SYNC_ADV
example?
Thanks
索引和例子都没有RTC相关的示例程序
I'm not sure, but documenting baseband registers will make possible porting NimBLE to this chips.
The provided startup code both sets and clears bits in the registers R8_PLL_CONFIG (0x4000104B) and R8_FLASH_CFG (0x40001807), but their contents are undocumented in CH583DS1_EN.pdf
See https://github.com/openwch/ch583/blob/main/EVT/EXAM/SRC/StdPeriphDriver/CH58x_sys.c#L29 and https://github.com/openwch/ch583/blob/main/EVT/EXAM/SRC/StdPeriphDriver/CH58x_sys.c#L113
See https://github.com/openwch/ch583/blob/main/EVT/EXAM/SRC/StdPeriphDriver/CH58x_sys.c#L98
The values written to these registers has also changed with library updates, so we need to know what these are for.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.