@thom4s said in [SOLVED] STM32F103C8T6 bluepill clone - RFM69HW SPI port 1 and ILI9341 SPI port 2 not working together:
o myself. Problem were in wrong definition of IRQ pin in sketch. But, as I found out STM32F103C8T6 has SPI 1 running on 72MHz (for SPI max 72/2 = 36MHz) and SPI 2 36MHz (for SPI max 36/2 = 18MHz) so it were a stupid idea to wire TFT display to SPI 2 port which is slower than SPI 1 with RFM69HW which doesnt need so fast SPI. Therefore I switched radio to SPI-2 and TFT display to faster SPI-1.
Radio SPI-2 and TFT ILI9341 SPI-1 wiring
I'm having the same problem with NRF24L01 + ILI9341.
TFT is on the SPI2 , its working but NRF24L01 on SPI1 doesnt work the moment i call tft.begin.
Its not hardware related. something is wrong when i initialize the spi in the Adafruit_ILI9341_STM::begin
Hello @wrendral. I have been operating a similar project for over a year now and experienced many issues. I operate about 20 custom made valves over a distance of 150 meters using NRF 2401L+, into an ethernet gateway. As @iguaan questioned do you intend to use PA/LNA module. My first advice would be to use a lower frequency radio. You will get it to work at 2.4GHz over that distance in open air but trees will definitely affect and even block the signal. How many valves do you intend to operate or is it just one? If more than one I would set up a repeater at the valve site which would talk to your base station and then you could use radios with PCB antennas on the valves. Be aware of the cheap omni antennas ( you should be using an omi or yagi antenna over that distance) as they vary depending on supplier. I have thrown out many after testing with an antenna analyser. (they caused various intermittent issues). What type of latching solenoid valve are you using? @Grubstake makes a good suggestion which I have also implemented, use a motor driver, it interfaces to the cpu and drives 12V. Also has protection. Switching 2A thru your solenoid may eventually burn out the relay contacts. @ejlane FYI, a latching solenoid needs reverse polarity switching to change states. Your suggestion is good but only switches on off. Also @wrendral is controlling a 12V step up inverter to supply the solenoid and save power by only turning it on via Q1 as required. Are you using J3. The radio is usually hooked up to D10,D11,D12,D13 to keep things standard and not use software emulated SPI interface. I would also wire up the radio IRQ even if you dont use it initially, if you are making a pcb. I assume your using 3.3V Pro mini therefore you can feed your 3.3V supply to VCC2 not Raw where it gets regulated again. Or feed VDD into raw. I would also put small electrolytics and .01uf caps close to the input and output of your regulator. It will work with out them but you may get intermittent issues when you start switching loads and running switching inverters. Just precautions for reliability! Your concept is ok. Good luck. I look forward to seeing how you go.
Oh boys... a lot of information here.
Thanks so much... but I've already place the pcb order... I have make an order for 10 pieces.
Bun in the mean time I'll experiment and modify the schema thanks to you all
Anyway I have placed there this capacitor ... I hope will be ok for this time.
Thanks so much for all information