Photon/P1 pin function chages


#26

@peekay123, LOL yeah,

git clone https://github.com/spark/firmware.git


#27

@wesner0019, that will clone the main branch, not develop! You need to specify the branch with:

git clone -b develop https://github.com/spark/firmware.git

:smile:


#28

We should coordinate with Satish so the functionality on those pins aligns with that of the extra Electron pins. If we make 'em C0-C5 then those pin capabilities should line up. Remember that B0-B5 will also be available, and those pin capabilities may line up better- no idea at this point.


#29

@peekay123, Got it make but get an error at the end. Used: make PLATFORM=photon,
actually i should have used: make PLATFORM=P1


#30

Looks like you’re missing the stat command. You can install that with MinGW.


#31

@mdma is right and you also need to make and flash the system firmware first from the “modules” directory. :smile:


#32

@Dick @satishgn Hmm, that would be awexome if they could line up perfectly… but since we are sweeping up the “extra” pins of both systems… it’s highly unlikely that the same port pins (and therefor same functionality) would overlap. Because of this, perhaps a separate naming scheme would be best. P10-P15 [aka P1(0)-P1(5)]? This may come up in future systems, and we would have to have unique “extra” pin names to keep the confusion minimal.


#33

@mdma, i just installed the MinGW, show do I install a stat command? Noob at this whole process.

@peekay123, I am trying to follow the https://github.com/spark/firmware/tree/develop directions but there seems to be some gaps that need to be also like you just pointed out.

so I would change directories then perform the same command: make PLATFORM=P1. I have not yet gotten to the point of flashing. One way says that I can do OTA or USB. I’d prefer the OTA but am unsure how to flash this .bin file. Is is using node.js and then using the commands to flash via a specified location?

Thanks all for helping out in this.


#34

P10-P15 might be a bit confusing, read P ten and P fifteen.

P00-P05 might be read P zero and P five.

P20-P25 might be read P twenty and P twenty five.

Perhaps P1S0-P1S5 may work better, P0S0-P0S5, P2S0-P2S5, read P1, S0-S5, P0 S0-S5, P2 S0-S5, etc.

S could stand for spare :stuck_out_tongue: or “special”.


#35

I originally thought S0-S5 as well, but then different platforms with different spare pin functionality would be confusing to have S0 on both platforms.

It might come down to what seems to be the shortest, unique and future proof way to define spare pins for the system. Those 3 don’t really make the decision any easier though.

S0-S5 (not unique)
P1A-P1F (eww)
P1_0-P1_5 (uhg, I really hate underscores)
P1S0-P1S5 (unique, future proof, but not super short… might be one of the shortest ways we can currently do it though)


#36

@mdma, in the MinGW installation what packages should be installed?


#37

Follow the tutorial here: [Toolchain] Windows


#38

@bdub, I’ve got the toolchain working and figured out, just updated my photon to 0.4.3. It would be extremely helpful if you could find some time to create a branch for the spare pins.


#39

Just had a brief discussion today with the team on what to name these pins. I think we settled on P1S0-P1S5, but it’s a toss up between that and B0-B5. The nice thing about the branch is we can implement the feature as either of these to unblock you… and then we can settle on a naming scheme before we merge back into the develop branch. I’ll ping back when I have something for you, but it will be later on tonight or tomorrow morning.


#40

That’s awesome news!. Either way works for me. I can easily change my code to work with what every you come up with or change.


#41

@BDub, checking in to see if you’ve had time to look get something put together.
Thanks


#42

@BDub, Do you have any updates on adding the spare pins as GPIOs?


#43

Sorry @wesner0019 I got absolutely slammed and didn’t get to this yet. That said I have it prioritized on this sprint which starts tomorrow :smile:


P1 SPI1 and Spare IO
#44

Thanks @BDub, This is awesome how hard Particle works to help out developers!


#45

@BDub, So looking into this, below is what I came up with

Below needs to be added to the hal\src\stm32f2xx\pinmap_hal.c file:

I’m not sure what other files also need updating. Any ideas? Is this something I could build locally with?

/* B0 */ { GPIOB, GPIO_Pin_0, GPIO_PinSource0, ADC_Channel_8, NONE, TIM3, TIM_Channel_3, PIN_MODE_NONE, 0, 0 },
/* B1 */ { GPIOB, GPIO_Pin_1, GPIO_PinSource1, ADC_Channel_9, NONE, TIM3, TIM_Channel_4, PIN_MODE_NONE, 0, 0 },
/* B2 */ { GPIOC, GPIO_Pin_0, GPIO_PinSource0, ADC_Channel_12, NONE, NONE, NONE, PIN_MODE_NONE, 0, 0 },
/* B3 */ { GPIOC, GPIO_Pin_4, GPIO_PinSource4, ADC_Channel_14, NONE, NONE, NONE, PIN_MODE_NONE, 0, 0 },
/* B4 */ { GPIOC, GPIO_Pin_13, GPIO_PinSource13, NONE, NONE, NONE, NONE, PIN_MODE_NONE, 0, 0 },
/* B5 */ { GPIOC, GPIO_Pin_1, GPIO_PinSource1, ADC_Channel_11, NONE, NONE, NONE, PIN_MODE_NONE, 0, 0 }

chart created from the data STM32F20XX datasheet: