5125 views|9 replies

3414

Posts

0

Resources
The OP
 

【CH579M-R1】What is TMOS? [Copy link]

 

Take advantage of the weekend and update more

A major selling point of the WCH57x series this time is the 2.4G BLE 4.2

Let's start with that.

There is not much official information available

In addition to a lot of examples, there is only a "CH57xBLE protocol stack library description.pdf"

This document is only 12 pages long.

This is a brief introduction to the configuration and basic API of the protocol stack, which is a bit thin.

The document mentions a TMOS, which seems to be a quasi-operating system that implements some functions similar to an operating system.

It is said that it is tailored from TI's OSAL. Many code styles in the routines are similar to TI's protocol stack.

It should be that TMOS is used to schedule the protocol stack tasks (this TMOS is not the TMOS of F5 NETWorks)

External operations on the protocol stack also rely on the TMOS API

The protocol stack is given in the form of .lib+.h

More convenient with protocol stack simulation

Previous article [CH579M-R1] First time using it, I was sweating and mentioned whether it supports JLink

It is tested that there is no problem using jlink for debugging

The current Segger J-Flash software version does not support the WCH 579 series MCU

You need to select an MCU with the same core to simulate normally

If you like, STM32F030 is also OK

Therefore, it is impossible to peek into the four flash areas inside 579 through jflash.

It is not possible to directly use jflash to erase 579

Finally, we have to rely on the MDK flash algorithm file and jlink to burn and simulate 579

I guess we have to wait until Segger officially supports WCH-related series of MCUs.

Let’s run a routine first and try it out.

The code is very concise

The DEBUG pre-compilation is to initialize the serial port 1 peripheral

Print the version number of the protocol stack library file (not put it in the pre-compilation?)

CH57X_BLEInit is the initialization of the protocol stack library

It mainly initializes a series of parameters used by the protocol stack library, such as buff, buff size, clock source, stack size, transmit power, BLE working mode, mac, etc.

After filling bleConfig_t cfg;, plug it into BLE_LibInit to complete the initialization.

HAL_Init is used to initialize the hardware used, while TMOS_ProcessEventRegister registers the hardware operation events into TMOS for calling.

The HAL_ProcessEvent function can be tracked by the entity, but it is declared extern in the HAL.h file, and it feels like it will be called by the protocol stack.

GAPRole_PeripheralInit, no entity is visible

Peripheral_Init, this is very important. BLE's GAP, GATT, broadcast, etc. are all configured through this function. You need it to establish your own Bluetooth service. It is worth a serious look.

I just changed the source code and modified the broadcast name and device name.

Then send "Hello, EEWorld!" via Bluetooth.

Post a GIF and take a look

I didn’t use the WCH app, but used a PC client and USB dongle from a competitor.

There is still a lot of room for improvement

above......

This post is from Domestic Chip Exchange

Latest reply

Tmos is the name of wch, which is very similar to TI's osal. If you are interested, you can refer to it.   Details Published on 2020-9-27 11:43
Personal signature

So TM what......?

 

 

1w

Posts

204

Resources
From 2
 

Qinheng CH579M-R1 Development Board Review

Summary post: https://en.eeworld.com/bbs/thread-1140005-1-1.html

This post is from Domestic Chip Exchange
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle
Personal signature

玩板看这里:

http://en.eeworld.com/bbs/elecplay.html

EEWorld测评频道众多好板等你来玩,还可以来频道许愿树许愿说说你想要玩的板子,我们都在努力为大家实现!

 
 
 

931

Posts

3

Resources
3
 

I have a question: I opened the "BEL\peripheral" project and did not make any changes, but the compilation went wrong. Which file is missing?

This post is from Domestic Chip Exchange

Comments

It seems like there is something wrong with the project configuration. Is it because the target chip is selected incorrectly?  Details Published on 2020-9-14 14:17
 
 
 

310

Posts

5

Resources
4
 

I thought it was the name of MOS tube from the title.

This post is from Domestic Chip Exchange

Comments

There are many stories about TMOS, but it’s hard to tell them all. It’s very interesting.  Details Published on 2020-9-14 14:24
 
 
 

3414

Posts

0

Resources
5
 
hujj posted on 2020-9-14 08:59 I have a question: I opened the "BEL\peripheral" project and did not make any changes, but the compilation went wrong. Which file is missing? ...

It seems like there is something wrong with the project configuration. Is it because the target chip is selected incorrectly?

This post is from Domestic Chip Exchange

Comments

I checked again, the chip is correct, it is CH579M, the entire project file has not been moved, but the compilation failed.  Details Published on 2020-9-14 14:36
Personal signature

So TM what......?

 

 
 

3414

Posts

0

Resources
6
 
Song Yuanhao posted on 2020-9-14 09:35 I thought it was the name of MOS tube after seeing the title

There are many stories about TMOS, but it’s hard to tell them all. It’s very interesting.

This post is from Domestic Chip Exchange
Personal signature

So TM what......?

 

 
 

931

Posts

3

Resources
7
 
This post was last edited by hujj on 2020-9-14 14:37
ljj3166 posted on 2020-9-14 14:17 It seems like there is a problem with the project configuration. Is the target chip selected incorrectly?

I checked again, the chip is correct, it is CH579M, the entire project file has not been moved, but the compilation failed.

From the prompts, it seems that the macro definition is missing, and there is no prompt that the header file cannot be found during the compilation process.

This post is from Domestic Chip Exchange
 
 
 

7422

Posts

2

Resources
8
 

Apply it? ljj What bad things are you trying to do?

This post is from Domestic Chip Exchange
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 
 

3414

Posts

0

Resources
9
 
freebsder posted on 2020-9-14 21:42 Apply it? ljj what bad things are you going to do?

Damn, tell me quickly, did you develop Sogou's fuzzy spelling algorithm?

This post is from Domestic Chip Exchange
Personal signature

So TM what......?

 

 
 

4

Posts

0

Resources
10
 

Tmos is the name of wch, which is very similar to TI's osal. If you are interested, you can refer to it.

This post is from Domestic Chip Exchange
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list