Welcome, Guest
Username: Password: Secret Key Remember me

TOPIC: Pi Zero Wifi / STM32F103CBT6 Project Node Servers

Pi Zero Wifi / STM32F103CBT6 Project Node Servers 1 month 2 weeks ago #17961

  • Jon Chandler
  • Jon Chandler's Avatar
  • Offline
  • Moderator
  • Posts: 326
  • Thanks received: 338
Wow, you have been doing a lot! I need to take some time to read your posts in depth. I see I made a small comtribution with my "found enclosures" article. I will write another article soon....the picture is a teaser.

You are right about the modules coming from China. It doesn't make sense to build your own when you can buy an assembled board for less than the cost of the parts!
The following user(s) said Thank You: hop

Pi Zero Wifi / STM32F103CBT6 Project Node Servers 1 month 2 weeks ago #17962

  • Jon Chandler
  • Jon Chandler's Avatar
  • Offline
  • Moderator
  • Posts: 326
  • Thanks received: 338
The following user(s) said Thank You: hop

Pi Zero Wifi / STM32F103CBT6 Project Node Servers 1 month 1 week ago #17963

  • hop
  • hop's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 400
  • Thanks received: 45
Thank you Jon! Anything you contribute has ALWAYS led me in directions to things I never knew were there. And I SO VERY MUCH appreciate it!

Pi Zero Wifi / STM32F103CBT6 Project Node Servers 1 month 1 week ago #17966

  • hop
  • hop's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 400
  • Thanks received: 45
I ran into a problem with the center (or middle-man mind you) of my NODE SERVER project, the STM32F103C8T6. I got it to handle the display OLED just fine, but when I try to use I2C to communicate with that system, almost everything else hangs up. The simple timer-based flashing on-board LED IRQ handler still flashes away though so I know the board is working. So it has to be the main loop, what is called a CPU BLOCKER routine and I think I have it solved. My I2C handling either needs to be a state-machine approach, or IRQ handled. OR, a mixture of both.

I am working on porting the solution and should have simultaneous functionality tonight (I HOPE)! This will be a BIG breakthrough for me too, because I will have almost completed the middle-man in this project.

I will use IRQ handling to handle incoming messages from DMA to a command buffer and set a I2C STATE to 1. When realized in the main loop, the command interpretation will proceed.

More when I have coded and done it. :)

Pi Zero Wifi / STM32F103CBT6 Project Node Servers 3 weeks 1 day ago #17975

  • hop
  • hop's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 400
  • Thanks received: 45
I DID IT! WOOHOO!

I am now able to send messages from one MCU platform to another via I2C! I chased my tail for a few sessions and it turned out that I had my data and clock lines swapped. WOW! Now that I have that corrected, the messages are being received by the STM32F103C8T6 slave. YAY! Now I have to code the slave to respond to memory writes and reads. This should be easy! Then with message polling from the master, I should be able to get timely data from the slave to the master. Either that, or employ an interrupt line to let the master know that the slave has something to say and needs to be pulled/listened to.

This is AWESOME! What I love the most about this is the packet showed up beautifully on my Rigol DS1054Z! I saved the output from the scope, but no time to post images now since it is so hard to post images here STILL.

Pi Zero Wifi / STM32F103CBT6 Project Node Servers 2 weeks 5 days ago #17976

  • hop
  • hop's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 400
  • Thanks received: 45
A small complication has come up where the master I2C continues to repeat error conditions if the slave I2C is offline during messaging. I am working to deal with that using the I2C peripheral status messages as a reset guide. More on this later.

Another thing that popped up, now that I am leaping ahead to the other components of this build, is how to I2C the lowest component system of the build, the ATMEGA328P. I have it powered at 5vdc because I get the most mips out of the clock speed of 20 MHz. I am now considering powering that system at 3.3vdc however to help facilitate I2C communications between it and the middle bridge, the STM32F103. Yes it drops the mips down with the resulting clock of 10 MHz, but I feel that is still fast enough to handle the rudimentary functions that lower system is designed to handle. After all, if I need more power to do things like listen to audio, channel images or even video, I can just throw another STM32F103 on the lower side of the build. And since it runs on 3.3 vdc anyway, it can handle the tasks.

I just want the whole system at 3.3vdc. Mixing 3.3 with 5 on a system has its complications, like unprotected pins from 5vdc on a 3.3vdc device, level shifting, schottky diodes, etc. Plus the higher voltage and speed means more power consumption anyway. I believe a lot of my lower system goals will require less mips to still function properly.

More when I test, code, and apply it. :)
Time to create page: 0.238 seconds