Skip to content

Commit 66cbde8

Browse files
Updated review comments
1 parent 1b49e8a commit 66cbde8

File tree

6 files changed

+44
-46
lines changed

6 files changed

+44
-46
lines changed

dspic33e-adc-altsamp/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ Next, DMA uses DMA0STB base address to store the ADC samples and it generates in
2525
after transfer (TWO x 16 samples = 32 samples).
2626
Above process repeats continuously.
2727

28-
void \_\_attribute\_\_((\_\_interrupt\_\_)) _DMA0Interrupt(void);<br/>
28+
void \_\_attribute\_\_((\_\_interrupt\_\_)) _DMA0Interrupt(void);
2929
DMA interrupt service routine, moves the data from DMA buffer to ADC signal buffer
3030

31-
Timer time outs at 60M/(4999+1) = 12000 Hz.<br/>
32-
DMA interrupt @ 12K/32= 375 Hz.<br/>
31+
Timer time outs at 60M/(4999+1) = 12000 Hz.
32+
DMA interrupt @ 12K/32= 375 Hz.
3333
I/O pin toggles at 375/2= 187 Hz.
3434

3535
RA4 pin is toggled in ISR, hence it will be toggling at ~ 187Hz

dspic33e-adc-in-sleep/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ Start of conversion is issued in the background loop and device enters sleep mod
99

1010
When the ADC conversion is completed in sleep mode, it wakes up the device and enters ADC ISR.
1111

12-
void initAdc1(void);<br/>
12+
void initAdc1(void);
1313
ADC CH0 is set-up to covert AIN5 in 10-bit mode. ADC is configured to next sample data immediately after the conversion.
1414
But the start of conversion is issued manually in the background loop.
1515

16-
void _ADC1Interrupt()<br/>
16+
void _ADC1Interrupt()
1717
Device enters the ADC ISR after waking up from sleep mode. ADC result is read in the ISR and PORTA (RA4) pin is toggled.
1818

1919

dspic33e-ecan-crosswire/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ The configuration of the two ECAN modules is done in the ECAN1Config.c and ECAN2
2424
The number of message buffers to be allocated in DMA RAM are configured by using the following definitions
2525
in the ECAN1Config.h and ECAN2Config.h file.
2626

27-
#define ECAN1_MSG_BUF_LENGTH <br/>
28-
#define ECAN2_MSG_BUF_LENGTH <br/>
27+
#define ECAN1_MSG_BUF_LENGTH
28+
#define ECAN2_MSG_BUF_LENGTH
2929

3030
The aligment attribute is used to make sure that the DMA allocates the base address for the peripheral
3131
correctly and assigns an offset based on this base address. This is essential when using peripheral indirect
@@ -37,27 +37,27 @@ address generated by the peripheral. (in this case ECAN).
3737
The number of bytes may be decided based on the number of buffers being configured by the definition made earlier.
3838
This is calculated as follows -
3939

40-
Number of bytes = (ECAN1_MSG_BUF_LENGTH * Number of words in one buffer)*2 and <br/>
40+
Number of bytes = (ECAN1_MSG_BUF_LENGTH * Number of words in one buffer)*2 and
4141
Number of bytes = (ECAN2_MSG_BUF_LENGTH * Number of words in one buffer)*2.
4242

4343
For eg : If 4 message buffers are defined as
4444

45-
#define ECAN1_MSG_BUF_LENGTH 4, then,<br/>
45+
#define ECAN1_MSG_BUF_LENGTH 4, then,
4646
Number of bytes = 4 * 8 * 2 = 64 (because Number of words in one buffer = 8 for ECAN).
4747

4848
The information on transmit message identifiers and other bits are written as arguments into these functions
4949

50-
ecan1TransmitMsg(unsigned int buf, long txIdentifier, unsigned int ide, unsigned int remoteTransmit, unsigned int srr, unsigned int dataLength );<br/>
51-
ecan1TxData(unsigned int buf, unsigned int data1, unsigned int data2, unsigned int data3, unsigned int data4);<br/>
52-
ecan2TransmitMsg(unsigned int buf, long txIdentifier, unsigned int ide, unsigned int remoteTransmit, unsigned int srr, unsigned int dataLength );<br/>
53-
ecan2TxData(unsigned int buf, unsigned int data1, unsigned int data2, unsigned int data3, unsigned int data4);<br/>
50+
ecan1TransmitMsg(unsigned int buf, long txIdentifier, unsigned int ide, unsigned int remoteTransmit, unsigned int srr, unsigned int dataLength );
51+
ecan1TxData(unsigned int buf, unsigned int data1, unsigned int data2, unsigned int data3, unsigned int data4);
52+
ecan2TransmitMsg(unsigned int buf, long txIdentifier, unsigned int ide, unsigned int remoteTransmit, unsigned int srr, unsigned int dataLength );
53+
ecan2TxData(unsigned int buf, unsigned int data1, unsigned int data2, unsigned int data3, unsigned int data4);
5454

5555
The information on message acceptance filters and masks are written as arguments into these function
5656

57-
ecan1Filter(int n, long identifier, unsigned int exide,unsigned int bufPnt,unsigned int maskSel);<br/>
58-
ecan1Mask(int m, long identifierMask, unsigned int mide);<br/>
59-
ecan2Filter(int n, long identifier, unsigned int exide,unsigned int bufPnt,unsigned int maskSel);<br/>
60-
ecan2Mask(int m, long identifierMask, unsigned int mide);<br/>
57+
ecan1Filter(int n, long identifier, unsigned int exide,unsigned int bufPnt,unsigned int maskSel);
58+
ecan1Mask(int m, long identifierMask, unsigned int mide);
59+
ecan2Filter(int n, long identifier, unsigned int exide,unsigned int bufPnt,unsigned int maskSel);
60+
ecan2Mask(int m, long identifierMask, unsigned int mide);
6161

6262
Note :-
6363
a. The PPS configuration in the ecan1_config.c and ecan2_config.c source files change with the device being used. THe user is advised

dspic33e-ecan-fifo/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Description:
66

7-
Transmitting 6 messages from ECAN1 and receiving it in ECAN2 FIFO<br/>
7+
Transmitting 6 messages from ECAN1 and receiving it in ECAN2 FIFO
88
Transmitting 6 messages from ECAN2 and receiving it in ECAN1 FIFO
99

1010
32 Buffers are defined for ECAN1 and ECAN2
@@ -25,7 +25,7 @@ The configuration of the two ECAN modules is done in the ECAN1Config.c and ECAN2
2525
The number of message buffers to be allocated in DMA RAM are configured by using the following definitions
2626
in the ECAN1Config.h and ECAN2Config.h file.
2727

28-
#define ECAN1_MSG_BUF_LENGTH<br/>
28+
#define ECAN1_MSG_BUF_LENGTH
2929
#define ECAN2_MSG_BUF_LENGTH
3030

3131
The alignment attribute is used to make sure that the DMA allocates the base address for the peripheral
@@ -38,28 +38,28 @@ address generated by the peripheral. (in this case ECAN).
3838
The number of bytes may be decided based on the number of buffers being configured by the definition made earlier.
3939
This is calculated as follows -
4040

41-
Number of bytes = (ECAN1_MSG_BUF_LENGTH * Number of words in one buffer)*2 and <br/>
41+
Number of bytes = (ECAN1_MSG_BUF_LENGTH * Number of words in one buffer)*2 and
4242
Number of bytes = (ECAN2_MSG_BUF_LENGTH * Number of words in one buffer)*2.
4343

4444
For eg : If 4 message buffers are defined as
4545

46-
#define ECAN1_MSG_BUF_LENGTH 4, then,<br/>
46+
#define ECAN1_MSG_BUF_LENGTH 4, then,
4747
Number of bytes = 4 * 8 * 2 = 64 (because Number of words in one buffer = 8 for ECAN).
4848

4949
The information on transmit message identifiers and other bits are written as arguments into these functions
5050

5151

52-
ecan1TransmitMsg(unsigned int buf, long txIdentifier, unsigned int ide, unsigned int remoteTransmit, unsigned int srr, unsigned int dataLength );<br/>
53-
ecan1TxData(unsigned int buf, unsigned int data1, unsigned int data2, unsigned int data3, unsigned int data4);<br/>
54-
ecan2TransmitMsg(unsigned int buf, long txIdentifier, unsigned int ide, unsigned int remoteTransmit, unsigned int srr, unsigned int dataLength );<br/>
55-
ecan2TxData(unsigned int buf, unsigned int data1, unsigned int data2, unsigned int data3, unsigned int data4);<br/>
52+
ecan1TransmitMsg(unsigned int buf, long txIdentifier, unsigned int ide, unsigned int remoteTransmit, unsigned int srr, unsigned int dataLength );
53+
ecan1TxData(unsigned int buf, unsigned int data1, unsigned int data2, unsigned int data3, unsigned int data4);
54+
ecan2TransmitMsg(unsigned int buf, long txIdentifier, unsigned int ide, unsigned int remoteTransmit, unsigned int srr, unsigned int dataLength );
55+
ecan2TxData(unsigned int buf, unsigned int data1, unsigned int data2, unsigned int data3, unsigned int data4);
5656

5757
The information on message acceptance filters and masks are written as arguments into these function
5858

59-
ecan1Filter(int n, long identifier, unsigned int exide,unsigned int bufPnt,unsigned int maskSel);<br/>
60-
ecan1Mask(int m, long identifierMask, unsigned int mide);<br/>
61-
ecan2Filter(int n, long identifier, unsigned int exide,unsigned int bufPnt,unsigned int maskSel);<br/>
62-
ecan2Mask(int m, long identifierMask, unsigned int mide);<br/>
59+
ecan1Filter(int n, long identifier, unsigned int exide,unsigned int bufPnt,unsigned int maskSel);
60+
ecan1Mask(int m, long identifierMask, unsigned int mide);
61+
ecan2Filter(int n, long identifier, unsigned int exide,unsigned int bufPnt,unsigned int maskSel);
62+
ecan2Mask(int m, long identifierMask, unsigned int mide);
6363

6464
Note :- The PPS configuration in the ecan1_config.c and ecan2_config.c source files change with the device being used. THe user is advised
6565
to refer the datasheet and use the appropriate values for RPINR/RPOR registers for proper operation.

dspic33e-ecan-rtr/README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ Transmitting a Remote message from ECAN1 and requesting transmission from ECAN2
88

99
4 Message Buffers are defined for ECAN1 and ECAN2
1010

11-
1211
Two message buffers are configured for ECAN1. One is configured as a Transmit Buffer to generate a Remote Frame.
1312
The other is configured as a Receive Buffer to receive message sent by ECAN2.
1413

1514
One message buffer in ECAN2 is configured as a Transmit buffer for transmitting the requested data frame.
1615

17-
1816
Filters and Masks are enabled for both ECAN1 and ECAN2 for Message Reception.
1917

2018
ECAN2 Transmit Buffer will be pointing to a filter in the case of Remote Transmission.
@@ -28,7 +26,7 @@ The configuration of the two ECAN modules is done in the ECAN1Config.c and ECAN2
2826
The number of message buffers to be allocated in DMA RAM are configured by using the following definitions
2927
in the ECAN1Config.h and ECAN2Config.h file.
3028

31-
#define ECAN1_MSG_BUF_LENGTH<br/>
29+
#define ECAN1_MSG_BUF_LENGTH
3230
#define ECAN2_MSG_BUF_LENGTH
3331

3432
The aligment attribute is used to make sure that the DMA allocates the base address for the peripheral
@@ -41,27 +39,27 @@ address generated by the peripheral. (in this case ECAN).
4139
The number of bytes may be decided based on the number of buffers being configured by the definition made earlier.
4240
This is calculated as follows -
4341

44-
Number of bytes = (ECAN1_MSG_BUF_LENGTH * Number of words in one buffer)*2 and<br/>
42+
Number of bytes = (ECAN1_MSG_BUF_LENGTH * Number of words in one buffer)*2 and
4543
Number of bytes = (ECAN2_MSG_BUF_LENGTH * Number of words in one buffer)*2.
4644

4745
For eg : If 4 message buffers are defined as
4846

49-
#define ECAN1_MSG_BUF_LENGTH 4, then,<br/>
47+
#define ECAN1_MSG_BUF_LENGTH 4, then,
5048
Number of bytes = 4 * 8 * 2 = 64 (because Number of words in one buffer = 8 for ECAN).
5149

5250
The information on transmit message identifiers and other bits are written as arguments into these functions
5351

54-
ecan1TransmitMsg(unsigned int buf, long txIdentifier, unsigned int ide, unsigned int remoteTransmit, unsigned int srr, unsigned int dataLength );<br/>
55-
ecan1TxData(unsigned int buf, unsigned int data1, unsigned int data2, unsigned int data3, unsigned int data4);<br/>
56-
ecan2TransmitMsg(unsigned int buf, long txIdentifier, unsigned int ide, unsigned int remoteTransmit, unsigned int srr, unsigned int dataLength );<br/>
57-
ecan2TxData(unsigned int buf, unsigned int data1, unsigned int data2, unsigned int data3, unsigned int data4);<br/>
52+
ecan1TransmitMsg(unsigned int buf, long txIdentifier, unsigned int ide, unsigned int remoteTransmit, unsigned int srr, unsigned int dataLength );
53+
ecan1TxData(unsigned int buf, unsigned int data1, unsigned int data2, unsigned int data3, unsigned int data4);
54+
ecan2TransmitMsg(unsigned int buf, long txIdentifier, unsigned int ide, unsigned int remoteTransmit, unsigned int srr, unsigned int dataLength );
55+
ecan2TxData(unsigned int buf, unsigned int data1, unsigned int data2, unsigned int data3, unsigned int data4);
5856

5957
The information on message acceptance filters and masks are written as arguments into these function
6058

61-
ecan1Filter(int n, long identifier, unsigned int exide,unsigned int bufPnt,unsigned int maskSel);<br/>
62-
ecan1Mask(int m, long identifierMask, unsigned int mide);<br/>
63-
ecan2Filter(int n, long identifier, unsigned int exide,unsigned int bufPnt,unsigned int maskSel);<br/>
64-
ecan2Mask(int m, long identifierMask, unsigned int mide);<br/>
59+
ecan1Filter(int n, long identifier, unsigned int exide,unsigned int bufPnt,unsigned int maskSel);
60+
ecan1Mask(int m, long identifierMask, unsigned int mide);
61+
ecan2Filter(int n, long identifier, unsigned int exide,unsigned int bufPnt,unsigned int maskSel);
62+
ecan2Mask(int m, long identifierMask, unsigned int mide);
6563

6664
Note :- The PPS configuration in the ecan1_config.c and ecan2_config.c source files change with the device being used. THe user is advised
6765
to refer the datasheet and use the appropriate values for RPINR/RPOR registers for proper operation.

dspic33e-ext-intr/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ Both, initialization and interrupt service routines have been provided.
1313
The code example in the file traps.c contains trap service routines (handlers) for hardware exceptions
1414
generated by the dsPIC33E device
1515

16-
For Testing:<br/>
17-
dspic33ep512gm710 : connect the pins RB3 and RF8<br/>
18-
dspic33ep512mu810 : connect the pins RA0 and RA4<br/>
19-
dspic33ep256gp506 : connect the pins RB5 and RF8<br/>
16+
For Testing:
17+
dspic33ep512gm710 : connect the pins RB3 and RF8
18+
dspic33ep512mu810 : connect the pins RA0 and RA4
19+
dspic33ep256gp506 : connect the pins RB5 and RF8
2020

2121
Note :- The PPS configuration in the external_interrupts.c source file changes with the device being used. The user is advised
2222
to refer the datasheet and use the appropriate values for RPINR/RPOR registers for proper operation.

0 commit comments

Comments
 (0)