Commit Graph

39 Commits (889280dce5ca241f7c45037dc742d319ad7db890)
 

Author SHA1 Message Date
Oleg 889280dce5 Put init modbus function outside periphery 2 weeks ago
Oleg 6a6ca4cd3e Change modbus configuration logic
COMM board asks CPU for modbus config now if it was not sent
earlier (for example after flashing COMM board)
2 weeks ago
Oleg b0b42819a8 Add .project file 2 weeks ago
Oleg 0be0ccafdc Change .gitignore file 2 weeks ago
Oleg aef79400ce Additional changes for previous commit 2 weeks ago
Oleg 4315b2865d Clean project. Change receiveCpuModbusData function 2 weeks ago
Oleg 3abcb43b33 clear project 2 weeks ago
Oleg 7ab4153cca Add cpu to comm modbus data handling 2 weeks ago
Oleg 31b3b12a81 Clean the project 3 weeks ago
Oleg 06518a828d Add modbus lib instead of original one
1. All modbus classes are united in one (modbusRTU) class with
easier and clearier user interface

2. Temp variable for registers start address are created
(should be replaced for some getter function later)

3. 2 modbus register are sending in one message now without
its address. This requires some synchronization to be
implemented

4. There is a lot of garbage from previous modbus here.
3 weeks ago
Oleg 46d4b79e90 Add modbus.
Init with CPU data. If COMM is removed and then installed back -
modbus will not work because CPU board will not send config data.
CPU board should detect reinstalling/reprogramming of COMM board and
send config data again (with asking software version)

Modbus here just work itself. There is no connection btw COMM and CPU
except sending config data
3 weeks ago
Oleg 4606a25db4 Clean more 3 weeks ago
Oleg 5db1783db5 Clean project. Modbus still working 3 weeks ago
Oleg 9feba6b8c9 It works now
The problem was with InitCPUTimers dunction (it was commented).
But some fact was found: If you flash with correct software first
 - Modbus is working. Then, if you comment InitCPUTimers function and
flash CPU again. The Modbus still working! But, if you turn off the power
Modbus will not work after power up. The reason is unknown
3 weeks ago
Oleg a0fef5214d Modbus still working here 3 weeks ago
Oleg 5f28745064 Merge branch 'feature/CAN_timeOut' into dev
Add time-out function in CAN interface
1 month ago
Oleg 8cbdce2192 Add time out feature 1 month ago
Oleg 61b34218ff Add memory map for XINTF. Change zone0 to zone6 1 month ago
Oleg a450de810f Fix some CAN interface argument capacity
1. Change rx and tx function to process Uint64 values, not Uint32
2. Make LSB first as default
1 month ago
Oleg cc59948011 Fix can transmitMsg()
1. Now method takes Uint62 instead of Uint32
2. Comment TA bit checking for not potentially make processor to stand in
endless loop if there is no answer from another node
3. The method do not set data lenght now. It should be set when MBOX
configuring
1 month ago
Oleg d864977511 First test
1. Add an arbitrator class to control all necessary periphery
main2.cpp represents it usage.
main.cpp without periphery class.

2. Add XINTF init and DigitalIO interface
3. Change DI/O MBOX length to 2 bytes instead of 3
1 month ago
Oleg c692668f7b Expand CAN functionality.
1. Add new methods for update and receive. It is become possiple
to work with Uint32.
2. ADD changes in ConfigTX method. It determines data length
of a MBOX now as well
1 month ago
Oleg dbbd22524b Merge updated branch 'feature/baseCAN' into dev 1 month ago
Oleg 07bb5edd57 Change/add methods
1. Change receiveMsg. Now it returns int16 with error identification
2. Change CANMessage structure. Now it only has dataLenght variable
   instead of previos MsgCtrlReg union
3. Change MsgCtrlReg. Add an OPC flag in it
4. Change configRxMBox method. Overwrite protection enabling is
   added
1 month ago
Oleg 7cd6a2ea9e Clean the code 1 month ago
Oleg b884754d93 Add mbox interrupt handling 1 month ago
Oleg 182ada3bba Fix mistakes 2 months ago
Oleg ac023187cd Overload "trasmitMsg" method 2 months ago
Oleg 714f0265cc Merge branch 'feature/baseCAN' into dev
CAN module is added here. This is not the can protocol for communication
between CPU and COMM boards, but common CAN protocol that must be
extended in the future
2 months ago
Oleg 0246107428 Fix compile problem
It started not to compile at all without changing anything manually
Some libs were deleted (because they was added automatically)

Add protection agaist accessing to MBOX with number >31
in transmitMsg method

Add TPL configuration in configTX method

Clear some garbage
2 months ago
Oleg 0efa3cb375 Add changes in init functions
Replace #define to enum for safety reasons

Now config function takes as an arguments not only baudrate, but
flags for most significant bit and self teset mode initialization.
All parameters have a default value now

Add protection against access to MBOX with number > 31 in every
possible functions

Remove some old code
2 months ago
Oleg de707c052a Add error control. Fix config mistakes with TRS reset
Add function for configuring system interrupts
Add interrupt that monitors the following errors:
    EPIM - CAN module has entered “error passive” mode
    WLIM - One or both error counters (TX and RX) are >= 96
    AAIM - A transmission request was aborted
Delete some old code
2 months ago
Oleg fd72d2833b Add remote frames 2 months ago
Oleg dfb90e3ee8 Change config methods. Tested with the second board
Things to be added in the future:
1) Remote requests
2) Possibility to init CAN interrupts
3) Erorrs handling
2 months ago
Oleg 4446eb970a Add RX and TX methods. Change config methods
Must be tested without test mode
2 months ago
Oleg 82df69c385 Split configuarion and communication. Start of RX. 2 months ago
Oleg 34fe93213f Branch starts 2 months ago
Oleg eee4c90277 Start inititilization process 2 months ago
Oleg b67c8564a4 Start 2 months ago