Articles

Affichage des articles du octobre, 2022

Queue

Image
  Messages queue Queue is used mainly to echange data between threads . 1.Message queue create To create queue we will use  tx_queue_create . First argument is queue handle  queue_ptr . Second argument is name os queue  my_queue . Third argument is queue message size 1-16words. In out case  1 . Forth argument is queue buffer  queue_stack . Fifth argument is queue buffer size in bytes 1000 . 2.Message queue send To add message to queue we use function  tx_queue_send . First argument is queue handle  queue_ptr . Second argument is pointer to messagge  message . Third argument is waiting time TX NO WAIT (0x0) to TX WAIT FOREVER(0xFFFFFFFF). 3.Message queue receive To remove message from queue we use function  tx_queue_receive  First argument is queue handle  queue_ptr . Second argument is pointer to messagge  message . Third argument is waiting time TX NO WAIT (0x0) to TX WAIT FOREVER(0xFFFFFFFF). 4. example Github link :  https://github.com/Belkacem-roukaya/queue-Threads-Azure-RTOS

NETXDUO

 Nx_MQTT_Client application description : This application provides an example of Azure RTOS NetX/NetXDuo stack usage. It shows how to exchange data between client and server using MQTT protocol in an encrypted mode supporting TLS v1.2 . The main entry function tx_application_define() is called by ThreadX during kernel start, at this stage, all NetX resources are created.  A  NX_PACKET_POOL is allocated A  NX_IP  instance using that pool is initialized The  ARP ,  ICMP ,  UDP  and  TCP  protocols are enabled for the  NX_IP  instance A  DHCP client is created. The application then creates 3 threads with the different priorities: AppMainThread  (priority 10, PreemtionThreashold 10) : created with the  TX_AUTO_START  flag to start automatically. AppMQTTClientThread  (priority 3, PreemtionThreashold 3) : created with the  TX_DONT_START  flag to be started later. AppSNTPThread   (priority 5, PreemtionThreashold 5) : created with the  TX_DONT_START  flag to be started later **  The  AppMainT

STM32F7_HAL_ETH_MQTT_CLIENT

Image
  STM33F7 _ FREERTOS _ LWIP _MQTT 1/ Introduction MQTT :   link :   https://azurertosactia.blogspot.com/2022/10/iot.html 2/  Ethernet Network     link :   https://azurertosactia.blogspot.com/2022/10/ethernet.html 3/  STM32H7 _ Ethernet :  link :   https://azurertosactia.blogspot.com/2022/10/stm32h7-eth.html 4/ Configuration Ethernt Freertos  link :  https://azurertosactia.blogspot.com/2022/10/stm32-ethernet.html 5/ Implementation : Added MQTTInerface.c/h files to port paho MQTT library for STM32 HAL + FREERTOS + LWIP Added Socket & Netconn API based port functions for timer and network ** MQTTInterface.h : **  MQTTInterface.c : **  . main.c : **  FreeRTOS.c : Github link :   https://github.com/Belkacem-roukaya/STM32F7_HAL_ETH_MQTT_CLIENT Reference : https://www.eclipse.org/paho/ https://github.com/eclipse/paho.mqtt.embedded-c https://www.instructables.com/id/How-to-implement-embedded-Mqtt-Client-using-W5500-/ http://blog.naver.com/pcppcp454/221380882726 https://blog.naver.com/pcppc

stm32- Ethernet

Image
Cortex M7 - connection  Ethernet Configuration Ping test : Github link :  https://github.com/Belkacem-roukaya/ethernetStm32 more information :  https://www.youtube.com/watch?v=8r8w6mgSn1A https://community.st.com/s/article/FAQ-Ethernet-not-working-on-STM32H7x3

STM32H7-ETH

Image
 STM32H7’s Ethernet MAC peripheral The MAC is in charge of the Link layer of TCP/IP communication model.  Upper layers are managed by software. For example, Transport and Internet layers can be managed by the popular Light weight IP stack.  the physical layer, or PHY, is supported by external components and linked to an RJ45 connector.  The key features of the STM32H7 Ethernet MAC peripheral :   The peripheral supports both full- and half-duplex modes of operation at either 10 or 100 Mbit/s. Auto-negotiation between the peripheral and the external PHY enables automatic configuration of the operation mode. ** Duplex :   The term duplex is used to describe a communication channel that can carry signals in both directions, unlike a simplex channel, which carries a signal in only one direction . ** Half-duplex communication :  is a one-way data flow, which means that data can only work in one direction at a time. Data is not sent and received at the same time. ** Full-duplex communication 

Ethernet

Image
  Ethernet Network What is an Ethernet Network? As mentioned, Ethernet network is used to create local area network and connect multiple computers or other devices such as printers, scanners, and so on. In a wired network, this is done with the help of fiber optic cables, while in a wireless network, it is done through wireless network technology. An Ethernet network uses various topologies such as star, bus, ring, and more.   the Various Types of Ethernet Networks : Fast Ethernet : Gigabit Ethernet : 10-Gigabit Ethernet Switch Ethernet the Difference Between Wired Ethernet Network and Wireless Ethernet  Networks : Ethernet is one of the oldest ways to connect to the Internet. You can connect Ethernet cables to wired as well as wireless networks. Here are some pointers which distinguish these two types of  Ethernet networks . Wired Ethernet Network : This is the most conventional wired LAN or WAN type of connectivity. An Ethernet cable is connected to a modem directly, and its other en

IoT

Image
    MQTT Client Test 1/ Introduction : Definition of IoT: The I nternet O f T hings, or IoT, refers to billions of physical devices around the world that are now connected to the internet, collecting and sharing data. Thanks to cheap processors and wireless networks, it's possible to turn anything, from to an airplain, into part of the IoT. This adds a level of digital intelligence to devices that would be otherwise “dumb”, enabling them to communicate without a human being involved, and merging the digital and physical worlds. Web communication protocols : Approaching the IoT world, one can be amazed by how many protocols we can use to communicate IoT devices. There are many protocols such as AMQP, CoAP, MQTT and the omnipresence HTTP. Trying to stay in the practical world, we can shortly compare two of them: MQTT and HTTP . a) HTTP ( H yper T ext T ransfer P rotocol):  Most of us know about this, HTTP connection between client (web user) and web server. It is the common used prot