This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SPI interface b/w ST10F269 and MCP2515

hi,
has anyone interfaced MCP2515 with ST10F269. i am facing issues with establishing the connection b/w the two. the CAN routines are fine (i suppose), but the SPI interface between the two seems to be the issue. Can anyone please post his/her code if any. This would be of very much great help...
Thanks a lot in advance.

Rgds

Parents
  • Hello Andrew,

    I am sorry if i sound odd but, dont you think your question is out of scope. I believe that it's an internal issue and we should (if possible) concentrate on the problem i mentioned (if clear).
    Anyways i would like to thank Ejack Zhang for putting some light. his single statement made me dig into the EBI of ST10F and i believe i will find something to start with.
    I would really appreciate any valuable points from your side.

    The main problem is that the H/W is not available with me right now, thats why i am struggling and once the H/W reaches, time crunch will b there.

    Rgds

Reply
  • Hello Andrew,

    I am sorry if i sound odd but, dont you think your question is out of scope. I believe that it's an internal issue and we should (if possible) concentrate on the problem i mentioned (if clear).
    Anyways i would like to thank Ejack Zhang for putting some light. his single statement made me dig into the EBI of ST10F and i believe i will find something to start with.
    I would really appreciate any valuable points from your side.

    The main problem is that the H/W is not available with me right now, thats why i am struggling and once the H/W reaches, time crunch will b there.

    Rgds

Children
  • I've checked ST10F269's datasheet and user manual.

    To my astonishment, I found that ST10F269 already include two CAN 2.0B controllers!!!
    So till now, to my limited knowledge, I think IN NO CASE SHOULD YOU ADD A MCP2515 TO A ST10F269 APPLICATION, ONLY IF YOU ARE JUST KIDDING OR BEING KIDDED BY YOUR BOSS.

    Dude, today is not 1st, April...

  • oh comeon Zhang. i am not kidding, do you think since ST10F269 has two CAN modules that means no application in this embedded world should use an extra CAN interface. But yes, as u mentioned the term "limited knowledge" :) let me tell you that this product is to be installed in an aircraft which plays with 3 CAN interface also a hell lot of ARINC messages.this 3 CAN (via MCP2515) just forms only the 3% of the whole system.
    My knowledge may be much much less limited than your but i am working for this so that means there is at least one practical situation where its needed :).

    Rgds

  • Not really:

    Nobody here knows you or your project but, presumably, this person does know you and does know what you're working on - so they would be the ideal person to seek informed guidance.

    Also, since this person gave it to you, they must have had some reason(s) to beleive that it would help you - and only they can explain to you what those reasons may be...

  • Hi andrew,

    Do u really think that the conversation we are having is necessary. i am just seeking help in
    interfacing ST10F269 and MCP2515, keeping the reference as a working code snippet for 82C900.
    i have mentioned the issue about my understanding of the code snippet i pasted.
    Is this application impossible enough that i should question my boss about "why" this is required.

    is there any prerequisite for asking questions in this forum, except that the questoner should be sane and the question whould be relevant to the concerned MCU architecture.

    I am sorry if i asked something really really silly.

    Rgds and thanks a lot.

  • It should be about Keil tools or products: http://www.keil.com/forum/

  • ok,
    I agree, thanks for the support Zhang
    Have a great day.

    Rgds
    Sanoop

  • let me tell you that this product is to be installed in an aircraft which plays with 3 CAN interface also a hell lot of ARINC messages.this 3 CAN (via MCP2515) just forms only the 3% of the whole system.
    Well, without this information I cannot draw a right conclusion for sure.
    In fact I had a 8-channel CAN Distributor project which include a LM3S5xxx (one CAN included) and 8 MCP2515.
    So I sincerely hope in future, when you ask someone to help, you should be frank and provide sufficient information, because nobody else could be familar to your real need than YOUSELF.

    Now let's back to the topic, I've read the ST10F269's user manual and learn the memory organization of it.
    According to your code snippet:

    void WriteSingleSSCByte(WORD address,BYTE data)
    ...
    pPage = (unsigned char*)0x0F007C;
    pExCANMem = (unsigned char*)0x0F0000;
    ...
    do
    ; while(P3_7 ==0)
    ; *pPage = page;
    do
    ; while(P3_7 ==0); *(pExCANMem+lowaddress)=data;
    


    The accessed addresses are 0F'00xx, which means they all lie in Segment 15 of external addressing space.
    So it's not using the on-chip SSC but some external memory-mapped interface.
    Also I have checked 82C900's datasheet and it stated:

    Paging Mode Register:  xx7Ch
    

    In conclusion, the code snippet you provided can ALMOST prove that the former design used EBI to access 82C900, not SSC.
    So I think both hardware and software would be modified to replace 82C900 with MCP2515.

    Of course all these are just my deduction. I think you should talk with your manager to determine how to proceed this project. You should require more information from your team.